BUG #8212: Feature request: View original value of current_user in function with SECURITY DEFINER set

From: geoff(dot)montee(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8212: Feature request: View original value of current_user in function with SECURITY DEFINER set
Date: 2013-06-05 16:07:02
Message-ID: E1UkGEo-0002ZA-No@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8212
Logged by: Geoff Montee
Email address: geoff(dot)montee(at)gmail(dot)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.

Browse pgsql-bugs by date

  From Date Subject
Next Message bricklen 2013-06-05 16:33:54 Re: BUG #8211: Syntax error when creating index on expression
Previous Message acizov 2013-06-05 15:24:28 BUG #8211: Syntax error when creating index on expression