Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 627209F9FB1 for ; Sat, 18 Nov 2006 15:16:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 28762-08 for ; Sat, 18 Nov 2006 15:16:21 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by postgresql.org (Postfix) with ESMTP id 03C4C9F9B3F for ; Sat, 18 Nov 2006 15:16:20 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so641442pye for ; Sat, 18 Nov 2006 11:15:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=oxgOW5Ok3I8pz+AhfqH0d72pPiWJrOGFdBRPaQMH0sLfqlWm0pLQ670tW/562jzSgegpuu/F+YiNTCeb5e1ymyC5kpFt+uKNrl6XUZQpR3K7++VF1rjGIepLeEaN+cEpb6lGcMau935phNlmss7qh8R6xouKA2PXnlJ83EFG9nA= Received: by 10.35.121.2 with SMTP id y2mr4826811pym.1163877345494; Sat, 18 Nov 2006 11:15:45 -0800 (PST) Received: by 10.35.80.10 with HTTP; Sat, 18 Nov 2006 11:15:45 -0800 (PST) Message-ID: Date: Sun, 19 Nov 2006 00:45:45 +0530 From: "Rajesh Kumar Mallah" To: "Tom Lane" Subject: Re: transactional shared variable in postgresql Cc: pgsql-sql@postgresql.org In-Reply-To: <532.1163875210@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3573_4441864.1163877345377" References: <532.1163875210@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/201 X-Sequence-Number: 26853 ------=_Part_3573_4441864.1163877345377 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/19/06, Tom Lane wrote: > > "Rajesh Kumar Mallah" 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 Hi, wouldnt' it affect the connection pooling , i am using DBI::Cache and mod_perl ? needs. > http://www.postgresql.org/docs/8.1/static/runtime-config-custom.html i dont think i understand the usage properly, i did the below postgresql.conf custom_variable_classes = 'general' # list of custom variable class names general.employee = '' am i supposed to see the variable general.employee when i do "show all " ? i did not see it in fact! my question is how can i set it and read it regds Mallah. regards, tom lane > ------=_Part_3573_4441864.1163877345377 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 11/19/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"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

Hi,

wouldnt' it affect the connection pooling , i am using DBI::Cache and mod_perl ?

needs.
http://www.postgresql.org/docs/8.1/static/runtime-config-custom.html


i dont think i understand the usage properly,

 i did the below postgresql.conf
custom_variable_classes = 'general'             # list of custom variable class names
general.employee = ''

am i supposed to see the variable general.employee when i do "show all " ?
i did not see it in fact!

my question is how can i set it and read it

regds
Mallah.
 

                        regards, tom lane

------=_Part_3573_4441864.1163877345377--