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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
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 05:58:29
Message-ID: 13906.1141711109@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-07 06:05:17 Re: JSP pages don't work with database after postgres downgrade
Previous Message Michael Fuhr 2006-03-07 05:46:50 Re: is it possible to get current_user inside security definer function ?