Re: SESSION_USER vs. CURRENT_USER

From: "Larry Rosenman" <lrosenman(at)pervasive(dot)com>
To: <emilu(at)encs(dot)concordia(dot)ca>, "Postgresql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: SESSION_USER vs. CURRENT_USER
Date: 2006-02-06 21:49:08
Message-ID: D1D2D51E3BE3FC4E98598248901F75940328DB59@ausmail2k4.aus.pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Rosenman(at)pervasive(dot)com
Web: www.pervasive.com

Browse pgsql-general by date

  From Date Subject
Next Message Tyler MacDonald 2006-02-06 22:30:30 Any way to make PG driver obey PrintWarn?
Previous Message Emi Lu 2006-02-06 21:12:35 SESSION_USER vs. CURRENT_USER