Re: transactional shared variable in postgresql - Mailing list pgsql-sql

From Tom Lane
Subject Re: transactional shared variable in postgresql
Date
Msg-id 532.1163875210@sss.pgh.pa.us
Whole thread Raw
In response to transactional shared variable in postgresql  ("Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>)
Responses Re: transactional shared variable in postgresql
Re: transactional shared variable in postgresql
List pgsql-sql
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
> In our webapps, we use the same username to connect to the database
> for all kind of updates. Hence we are not able to makeout whoo modified
> what . However at application level we have different "userid" for different
> users of the system. we want to somehow pass this "userid"  to the databasee
> server  and accesss it from the triggers that implement the audit functions.

Perhaps it would be better to make your "userid" be the actual database
user?  But anyway, the custom GUC variable facility might serve your
needs.
http://www.postgresql.org/docs/8.1/static/runtime-config-custom.html
        regards, tom lane


pgsql-sql by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: transactional shared variable in postgresql
Next
From: "Rajesh Kumar Mallah"
Date:
Subject: Re: Random()