Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 441DE9F9FE2 for ; Sat, 18 Nov 2006 11:01:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 83861-10 for ; Sat, 18 Nov 2006 11:01:31 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by postgresql.org (Postfix) with ESMTP id C9DE59F9B3F for ; Sat, 18 Nov 2006 11:01:36 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so606872pye for ; Sat, 18 Nov 2006 07:01:35 -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:content-transfer-encoding:content-disposition:references; b=IUiOqRKoJa6AbF5vIN2jTLzZyBRp19TADyPkYVzXC8a+fHtzRgCiQjX1F5cQXEk5ep0WAfQXaaONFLVxFSoTuEWNoulk2ZLgVDS7hpbGXMmXuTiBkMCAUOa6SMRVYWTzeHMes+LapqSEGuuFo/0oLTmVC5HuSc0ZmQQ0tZzs+mc= Received: by 10.35.119.11 with SMTP id w11mr4384310pym.1163862094180; Sat, 18 Nov 2006 07:01:34 -0800 (PST) Received: by 10.35.80.10 with HTTP; Sat, 18 Nov 2006 07:01:34 -0800 (PST) Message-ID: Date: Sat, 18 Nov 2006 20:31:34 +0530 From: "Rajesh Kumar Mallah" To: imad Subject: Re: transactional shared variable in postgresql Cc: pgsql-sql@postgresql.org In-Reply-To: <1f30b80c0611180546p35332e82mb592bcd6a048576d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1f30b80c0611180546p35332e82mb592bcd6a048576d@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/193 X-Sequence-Number: 26845 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 audittrail. basically we want to log selected tables of database without modifying our web application code. is it possible to get transaction id (XID) for current transaction ? should it be used ? sorry for ignorance but i read some discouraging remarks regarding using it in apps as it is an internal stuff. regds mallah.