Re: Add support for logging the current role - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Add support for logging the current role
Date
Msg-id 20110217164539.GC4116@tamriel.snowman.net
Whole thread Raw
In response to Re: Add support for logging the current role  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Add support for logging the current role  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> Ugg, wait a minute.  This not only adds %U; it also changes the
> behavior of %u, which I don't think we've agreed on.  Also, emitting
> 'none' when not SET ROLE has been done is pretty ugly.  I'm back to
> thinking we need to push this out to 9.2 and take more time to think
> about this.

%u, user_name, etc changes reverted.

%U now always returns the role currently being used for permissions
checks, by using show_session_authorization() when show_role() returns
'none'.  Ditto for CSV updates.

git log below, re-based patch attached.  All regression tests passed,
tested with log_line_prefix and csvlog also, all looks good to me.

Robert, if you say this has to be punted to 9.2 again, I'm giving up. ;)

    Thanks,

        Stephen

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Debian readline/libedit breakage
Next
From: Andrew Dunstan
Date:
Subject: Re: Debian readline/libedit breakage