dbTalk Databases Forums  

[SQL] Private functions

mailing.database.pgsql-sql mailing.database.pgsql-sql


Discuss [SQL] Private functions in the mailing.database.pgsql-sql forum.



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

Default [SQL] Private functions - 03-13-2010 , 11:57 AM






Hi all,
is there a way to write a function that can only be called by another
function but not directly using SELECT function_name ( )?
Thanks

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
  #2  
Old   
Pavel Stehule
 
Posts: n/a

Default Re: [SQL] Private functions - 03-13-2010 , 12:00 PM






Hello

directly no. There is only workaround - you can verify inside in
function content of pg_stat_activity_table - but this have to have a
superuser rights.

Regards
Pavel Stehule

2010/3/13 Gianvito Pio <pio.gianvito (AT) gmail (DOT) com>:
Quote:
Hi all,
is there a way to write a function that can only be called by another
function but not directly using SELECT function_name ( )?
Thanks

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
  #3  
Old   
Jasen Betts
 
Posts: n/a

Default Re: [SQL] Private functions - 03-13-2010 , 09:21 PM



On 2010-03-13, Gianvito Pio <pio.gianvito (AT) gmail (DOT) com> wrote:
Quote:
Hi all,
is there a way to write a function that can only be called by another
function but not directly using SELECT function_name ( )?
not really.

but there may be another way to get the effect you want.

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
  #4  
Old   
silly sad
 
Posts: n/a

Default Re: [SQL] Private functions - 03-15-2010 , 12:25 AM



On 03/14/10 06:21, Jasen Betts wrote:
Quote:
On 2010-03-13, Gianvito Pio<pio.gianvito (AT) gmail (DOT) com> wrote:
Hi all,
is there a way to write a function that can only be called by another
function but not directly using SELECT function_name ( )?

not really.

but there may be another way to get the effect you want.

read the section SECURITY DEFINER
and GRANT and REVOKE and CREATE USER

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

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 - 2013, Jelsoft Enterprises Ltd.