Thread: current_user in seucurity DEFINER functions

current_user in seucurity DEFINER functions

From
strk
Date:
In a security definer function current_user yelds the
name of the function definer rather than invoker.
Is it possible to fetch the invoker name instead ? How ?

Thanks in advance.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

Re: current_user in seucurity DEFINER functions

From
Pavel Stehule
Date:
2010/5/13 strk <strk@keybit.net>:
> In a security definer function current_user yelds the
> name of the function definer rather than invoker.
> Is it possible to fetch the invoker name instead ? How ?
>
> Thanks in advance.

try to use session_user

regards
Pavel Stehule
>


> --strk;
>
>  ()   Free GIS & Flash consultant/developer
>  /\   http://strk.keybit.net/services.html
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Re: current_user in seucurity DEFINER functions

From
strk
Date:
On Thu, May 13, 2010 at 09:21:46AM +0200, Pavel Stehule wrote:
> 2010/5/13 strk <strk@keybit.net>:
> > In a security definer function current_user yelds the
> > name of the function definer rather than invoker.
> > Is it possible to fetch the invoker name instead ? How ?
> >
> > Thanks in advance.
>
> try to use session_user

That's it. Thank you!

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html