Re: transactional shared variable in postgresql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: transactional shared variable in postgresql
Date: 2006-11-18 18:40:10
Message-ID: 532.1163875210@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2006-11-18 18:45:07 Re: Random()
Previous Message Volkan YAZICI 2006-11-18 18:34:23 Re: transactional shared variable in postgresql