Re: Reverting SET SESSION AUTHORIZATION command - Mailing list pgsql-hackers

From Fernando Nasser
Subject Re: Reverting SET SESSION AUTHORIZATION command
Date
Msg-id 3C84D7D1.5793D92D@redhat.com
Whole thread Raw
In response to Reverting SET SESSION AUTHORIZATION command  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reverting SET SESSION AUTHORIZATION command  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Tom Lane wrote:
> 
> The syntax that comes to mind offhand is
>         SET SESSION AUTHORIZATION DEFAULT;
> but perhaps someone has a better idea.
> 

Tom,

The SQL standard has already defined what should go there.
That would be CURRENT_USER, so you would have:

SET SESSION AUTHORIZATION CURRENT_USER

Note that CURRENT_USER is _not_ to be affected by a 
It remains the same user that was used for the connection.

The SESSION_USER is the one that changes if you issue a SET 
SESSION AUTHORIZATION (otherwise is the same as the CURRENT_USER).

P.S.: I did not name those things.  Complains to the SQL std committee
:-)

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: Postgresql backend to perform vacuum automatically
Next
From: Tatsuo Ishii
Date:
Subject: Re: Rep:Re: [BUGS] Encoding Problem?