dbTalk Databases Forums  

Functions in postgres

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Functions in postgres in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tk421
 
Posts: n/a

Default Functions in postgres - 11-09-2004 , 06:29 AM






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

Reply With Quote
  #2  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: Functions in postgres - 11-09-2004 , 07:08 AM






Am Dienstag, 9. November 2004 13:29 schrieb Tk421:
Quote:
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 majordomo (AT) postgresql (DOT) org



Reply With Quote
  #3  
Old   
Sim Zacks
 
Posts: n/a

Default Re: Functions in postgres - 11-09-2004 , 07:19 AM



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"" <vrobador (AT) vodafone (DOT) es> 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. 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

Reply With Quote
  #4  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: Functions in postgres - 11-09-2004 , 09:11 AM



On Tue, Nov 09, 2004 at 01:29:19PM +0100, Tk421 wrote:

Quote:
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



Reply With Quote
  #5  
Old   
Tk421
 
Posts: n/a

Default Re: Functions in postgres - 11-09-2004 , 11:33 AM



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" <mike (AT) fuhr (DOT) org>
To: "Tk421" <vrobador (AT) vodafone (DOT) es>
Cc: <pgsql-general (AT) postgresql (DOT) org>
Sent: Tuesday, November 09, 2004 4:11 PM
Subject: Re: [GENERAL] Functions in postgres


Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.