Обсуждение: Private functions

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

Private functions

От
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


Re: Private functions

От
Pavel Stehule
Дата:
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@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
>
> --
> 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
Дата:
On 2010-03-13, Gianvito Pio <pio.gianvito@gmail.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. 


Re: Private functions

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