On Mon, Apr 25, 2005 at 10:41:09AM -0400, Keith Worthington wrote:
>
> Is there a way to obtain the postgres user id or must I store the output of
> session_user in the tables?
You could grab usesysid from pg_user:
SELECT usesysid FROM pg_user WHERE usename = session_user;
You can convert the user ID back to the name with pg_get_userbyid():
SELECT pg_get_userbyid(1);
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/