transactional shared variable in postgresql
От | Rajesh Kumar Mallah |
---|---|
Тема | transactional shared variable in postgresql |
Дата | |
Msg-id | a97c77030611180430p764dac32ue19ade554ec80cbe@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: transactional shared variable in postgresql
Re: transactional shared variable in postgresql Re: transactional shared variable in postgresql Re: transactional shared variable in postgresql |
Список | 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 по дате отправления: