X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 589E29DCB32 for ; Thu, 12 Jan 2006 01:07:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92258-04 for ; Thu, 12 Jan 2006 01:07:07 -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 222409DCA65 for ; Thu, 12 Jan 2006 01:07:05 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0C575CV001283; Thu, 12 Jan 2006 00:07:05 -0500 (EST) To: "Krishnendra Nandi" cc: pgsql-admin@postgresql.org Subject: Re: Rule for updating ipaddress on insertion In-reply-to: References: Comments: In-reply-to "Krishnendra Nandi" message dated "Wed, 11 Jan 2006 14:26:25 +0530" Date: Thu, 12 Jan 2006 00:07:05 -0500 Message-ID: <1282.1137042425@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.085 required=5 tests=[AWL=0.085] X-Spam-Score: 0.085 X-Spam-Level: X-Archive-Number: 200601/139 X-Sequence-Number: 20227 "Krishnendra Nandi" writes: > Could you please tell me how do i record information as to which ip > address the connection was when doing an update/insert in postgres.. > I need a trigger which would capture this information In recent PG releases this info is available, see "Session Information Functions" here: http://www.postgresql.org/docs/8.0/static/functions-info.html regards, tom lane