transactional shared variable in postgresql - Mailing list pgsql-sql

From Rajesh Kumar Mallah
Subject transactional shared variable in postgresql
Date
Msg-id a97c77030611180430p764dac32ue19ade554ec80cbe@mail.gmail.com
Whole thread Raw
Responses Re: transactional shared variable in postgresql
Re: transactional shared variable in postgresql
Re: transactional shared variable in postgresql
Re: transactional shared variable in postgresql
List pgsql-sql
Hi ,<br /><br />Is there any way to set a variable from a web application (using dbi/perl , libpq etc),<br />and access
thesame variable from a C trigger inside a transaction ?<br /><br />the %_SHARED hash available in plperl provides only
sessionlevel isolation and <br />does not suit the requirement.<br /><br /><br />Original problem:<br /><br />we want
tosetup table auditing using table_log or audittrail projects.<br />the triggers used in these systems uses the current
databaseuser<br />to log to the audit tables.. <br /><br />In our webapps, we use the same username to connect to the
database<br/>for all kind of updates. Hence we are not able to makeout whoo modified <br />what . However at
applicationlevel we have different "userid" for different <br />users of the system. we want to somehow pass this
"userid" to the databasee<br />server  and accesss it from the triggers that implement the audit functions.<br /><br
/>wethought of using a table of single row and single column to store <br />the userid but we are concerned over the
performancedue to locking <br />issues.<br /><br />Regds<br />Mallah.<br /> 

pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Random()
Next
From: imad
Date:
Subject: Re: transactional shared variable in postgresql