Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread imad
Check this one http://archives.postgresql.org/pgsql-patches/2004-04/msg00280.php I have not personally worked on what is described in this page but someone will correct you in the community if anything is going wrong here. --Imad www.EnterpriseDB.com On 11/19/06, Rajesh Kumar Mallah <[EMAIL P

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
On 11/19/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> 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 differe

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Tom Lane
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> 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

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Volkan YAZICI
Hi, On Nov 18 06:00, Rajesh Kumar Mallah wrote: > Is there any way to set a variable from a web application (using > dbi/perl , libpq etc), and access the same variable from a C trigger > inside a transaction ? Also you may consider using a sequence for storing an integer value. This approach wil

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
On 11/18/06, Volkan YAZICI <[EMAIL PROTECTED]> wrote: Hi, On Nov 18 06:00, Rajesh Kumar Mallah wrote: > Is there any way to set a variable from a web application (using > dbi/perl , libpq etc), and access the same variable from a C trigger > inside a transaction ? Why don't you use a temporary

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Volkan YAZICI
Hi, On Nov 18 06:00, Rajesh Kumar Mallah wrote: > Is there any way to set a variable from a web application (using > dbi/perl , libpq etc), and access the same variable from a C trigger > inside a transaction ? Why don't you use a temporary table for that purpose? Regards.

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
hi, We do not want to modify our apps for doing auditing. we are considering table level auditing auditrail http://gborg.postgresql.org/project/audittrail/projdisplay.php seems to be doing a good job. i just need to access the "username" that starts the transaction in webapp from the trigger in a

Re: [SQL] transactional shared variable in postgresql

2006-11-18 Thread imad
Why dont you try to make 'username' part of your query. While auditing updates and inserts, the username can be some how made a part of the tuple being inserted. Just a thought! --Imad www.EnterpriseDB.com On 11/18/06, Rajesh Kumar Mallah <[EMAIL PROTECTED]> wrote: Hi , Is there any way to se

[SQL] transactional shared variable in postgresql

2006-11-18 Thread Rajesh Kumar Mallah
Hi , Is there any way to set a variable from a web application (using dbi/perl , libpq etc), and access the same variable from a C trigger inside a transaction ? the %_SHARED hash available in plperl provides only session level isolation and does not suit the requirement. Original problem: we