Re: SESSION_USER vs. CURRENT_USER - Mailing list pgsql-general

From Larry Rosenman
Subject Re: SESSION_USER vs. CURRENT_USER
Date
Msg-id D1D2D51E3BE3FC4E98598248901F75940328DB59@ausmail2k4.aus.pervasive.com
Whole thread Raw
In response to SESSION_USER vs. CURRENT_USER  (Emi Lu <emilu@encs.concordia.ca>)
List pgsql-general
Emi Lu wrote:
> Hello,
>
> Could someone clues me in the differences between SESSION_USER and
> CURRENT_USER please?
>

Session_user is the user that started the session. Current User is the
user that has
been set via set local session authorization, or via the SECURITY
DEFINER attribute of a function.

CURRENT_USER is what is used for permission checks.

see the manual.


--
Larry Rosenman
Database Support Engineer

PERVASIVE SOFTWARE. INC.
12365B RIATA TRACE PKWY
3015
AUSTIN TX  78727-6531

Tel: 512.231.6173
Fax: 512.231.6597
Email: Larry.Rosenman@pervasive.com
Web: www.pervasive.com

pgsql-general by date:

Previous
From: Emi Lu
Date:
Subject: SESSION_USER vs. CURRENT_USER
Next
From: Tyler MacDonald
Date:
Subject: Any way to make PG driver obey PrintWarn?