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 20110217025234.GN4116@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:
> Ah, so it does.  Sounds like you win.  Have we a patch implementing
> the sounds-like-its-agreed change, then?

Patch attached, rebased to current master.  Full git log:

    Thanks,

        Stephen

commit 47eebe20deb5da56ea6eb413ee80110887790440
Author: Stephen Frost <sfrost@snowman.net>
Date:   Wed Feb 16 21:42:14 2011 -0500

    Add current role to csvlog output

    This patch adds the current role to the csvlog output.  It also slightly
    changes the user_name column to return the session user, if it's been
    changed from the login user, instead of the original login user.
    This is only possible through SET SESSION AUTHORIZATION, which is only
    allowed for superusers.  These changes allow a clear view of what
    privileges commands are being run as.

commit 7456d4fc98e6207b562dd0325dc09bbb1c915ae9
Merge: c1b06c0 9301698
Author: Stephen Frost <sfrost@snowman.net>
Date:   Wed Feb 16 21:03:59 2011 -0500

    Merge branch 'master' of git://git.postgresql.org/git/postgresql into log_role_basic

commit c1b06c04af0c886c6ec27917368f3c674227ed2d
Author: Stephen Frost <sfrost@snowman.net>
Date:   Tue Feb 15 10:21:38 2011 -0500

    Add %U option to log_line_prefix

    This patch adds a %U option to log_line_prefix, to allow logging
    of the current role (previously not possible).  Also reworks %u
    a bit and adds documentation to clarify what each means.

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Add support for logging the current role
Next
From: Greg Stark
Date:
Subject: Re: Debian readline/libedit breakage