Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 07E8A9F9FB1 for ; Sat, 18 Nov 2006 14:40:17 -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 97450-05 for ; Sat, 18 Nov 2006 14:40:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A319A9F9B3F for ; Sat, 18 Nov 2006 14:40:12 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kAIIeAUC000533; Sat, 18 Nov 2006 13:40:10 -0500 (EST) To: "Rajesh Kumar Mallah" cc: pgsql-sql@postgresql.org Subject: Re: transactional shared variable in postgresql In-reply-to: References: Comments: In-reply-to "Rajesh Kumar Mallah" message dated "Sat, 18 Nov 2006 18:00:56 +0530" Date: Sat, 18 Nov 2006 13:40:10 -0500 Message-ID: <532.1163875210@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/199 X-Sequence-Number: 26851 "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 needs. http://www.postgresql.org/docs/8.1/static/runtime-config-custom.html regards, tom lane