Private functions

Поиск
Список
Период
Сортировка
Искать

Private functions

От:
Gianvito Pio <pio.gianvito@gmail.com>
Дата:
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

Re: Private functions

От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
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 :
> 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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

Re: Private functions

От:
Jasen Betts <jasen@xnet.co.nz>
Дата:
On 2010-03-13, Gianvito Pio  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. 

Re: Private functions

От:
silly sad <sad@bankir.ru>
Дата:
On 03/14/10 06:21, Jasen Betts wrote:
> On 2010-03-13, Gianvito Pio  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

FAQ