Search Postgresql Archives

Re: Connected user in a triggerfunction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 20, 2006 at 07:56:38AM +0100, Dick Kniep wrote:
> We are using logging in a database based on triggers and plpgsql functions. 
> This works OK. However, we want deletes to be recorded too, and there we want 
> the user who connected to be recorded in the log. So, how can I get the 
> connected user in a triggerfunction?

Use SESSION_USER or CURRENT_USER.  They're usually the same but see
the documentation for how they can differ:

http://www.postgresql.org/docs/8.1/interactive/functions-info.html

-- 
Michael Fuhr


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux