By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,712 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,712 IT Pros & Developers. It's quick & easy.

Functions in postgres

P: n/a
I've made some functions, an i want these functions to be used by a specified user, but i don't want this user can see the code of the functions. Does somebody knows how can i do this?

Sorry about my english, i'm spanish.

Víctor Robador Capel

Análisis de Sistemas y Programación

www.creativosdolmen.com
Nov 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Am Dienstag, 9. November 2004 13:29 schrieb Tk421:
I've made some functions, an i want these functions to be used by a
specified user, but i don't want this user can see the code of the
functions. Does somebody knows how can i do this?


The only way to do that would be to write the function in C and compile it
into a shared library.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2

P: n/a
It would seem that trying to hide code while using an open source system is just wrong. 8-)

That being said -- You would grant the user/group execute rights on the function, but no read rights on the system table that contains the function definition, pg_proc.
How is this user supposed to call the function? Does he have a cutomized application or does he have access to an SQL interface, such as Psql or PGAdmin?

Finally, I don't think you have to apologize for either bad English or for being Spanish, the native English speakers (and I only speak for myself here) appreciate the extra effort that non-English speaking people put in to allow the project to be fully internationalized. You should be proud of being Spanish, because even though there were a lot of bad points in Spanish history, Christopher Colombus did supposedly discover America, or something similar, and without that we wouldn't all be speaking English today.

sim

""Tk421"" <vr******@vodafone.es> wrote in message news:00****************************@creativosdolme n.com...
I've made some functions, an i want these functions to be used by a specified user, but i don't want this user can see the code of the functions. Does somebody knows how can i do this?

Sorry about my english, i'm spanish.

Víctor Robador Capel

Análisis de Sistemas y Programación

www.creativosdolmen.com
Nov 23 '05 #3

P: n/a
On Tue, Nov 09, 2004 at 01:29:19PM +0100, Tk421 wrote:
I've made some functions, an i want these functions to be used
by a specified user, but i don't want this user can see the code
of the functions.


Are you trying to hide the code itself, or are you just trying to
hide sensitive data embedded in the code? If the latter, then you
might be able to move the data to a table and create the function
with SECURITY DEFINER.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #4

P: n/a
I want to hide the code itself

Víctor Robador Capel

Análisis de Sistemas y Programación

www.creativosdolmen.com
----- Original Message -----
From: "Michael Fuhr" <mi**@fuhr.org>
To: "Tk421" <vr******@vodafone.es>
Cc: <pg***********@postgresql.org>
Sent: Tuesday, November 09, 2004 4:11 PM
Subject: Re: [GENERAL] Functions in postgres

On Tue, Nov 09, 2004 at 01:29:19PM +0100, Tk421 wrote:
I've made some functions, an i want these functions to be used
by a specified user, but i don't want this user can see the code
of the functions.


Are you trying to hide the code itself, or are you just trying to
hide sensitive data embedded in the code? If the latter, then you
might be able to move the data to a table and create the function
with SECURITY DEFINER.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.