Re: is it possible to get current_user inside security definer function ?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Boris Migo <migo(at)intrak(dot)sk>, pgsql-general(at)postgresql(dot)org
Subject: Re: is it possible to get current_user inside security definer function ?
Date: 2006-03-07 06:28:30
Message-ID: 20060307062830.GA19251@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 07, 2006 at 12:58:29AM -0500, Tom Lane wrote:
> Michael Fuhr <mike(at)fuhr(dot)org> writes:
> > Is this what you're after? I don't know if there's another way.
>
> > role_user := current_setting('role');
>
> We currently define the spec's CURRENT_ROLE as equivalent to
> CURRENT_USER, but I wonder if it shouldn't do what Boris is after.

I wondered why there wasn't a SOME_THING that showed that. Does
the spec say anything about it? I just did a quick search and
didn't see anything but I might easily have overlooked it.

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2006-03-07 06:30:45 Re: Sequencial scan instead of using index issue again
Previous Message Chris Travers 2006-03-07 06:10:09 Re: JSP pages don't work with database after postgres downgrade