BUG #8212: Feature request: View original value of current_user in function with SECURITY DEFINER set - Mailing list pgsql-bugs

From geoff.montee@gmail.com
Subject BUG #8212: Feature request: View original value of current_user in function with SECURITY DEFINER set
Date
Msg-id E1UkGEo-0002ZA-No@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8212
Logged by:          Geoff Montee
Email address:      geoff.montee@gmail.com
PostgreSQL version: 9.2.4
Operating system:   Linux
Description:        =


When a user calls a function that has SECURITY DEFINER set, the value of
"current_user" is changed to the name of the role that defined the
function.

For some use cases, it would be useful to be able to obtain the original
value of "current_user" from within the function. Specifically, this would
make sense in trigger functions used for auditing, where recording only
session_user may not be sufficient.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #8211: Syntax error when creating index on expression
Next
From: David Johnston
Date:
Subject: Re: BUG #8211: Syntax error when creating index on expression