pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRule for updating ipaddress on insertion
3+ messages / 3 participants
[nested] [flat]
* Rule for updating ipaddress on insertion
@ 2006-01-11 08:56 Krishnendra Nandi <krishnendra.nandi@hewitt.com>
2006-01-12 05:07 ` Re: Rule for updating ipaddress on insertion Tom Lane <tgl@sss.pgh.pa.us>
2006-01-12 05:23 ` Re: Rule for updating ipaddress on insertion Michael Fuhr <mike@fuhr.org>
0 siblings, 2 replies; 3+ messages in thread
From: Krishnendra Nandi @ 2006-01-11 08:56 UTC (permalink / raw)
To: pgsql-admin
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
Thanks and Regards
Krishnendra Nandi
Hewitt Associates India (Pvt.) Ltd.
Unitech World
Sector-39, Gurgaon
Haryana-India
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Rule for updating ipaddress on insertion
2006-01-11 08:56 Rule for updating ipaddress on insertion Krishnendra Nandi <krishnendra.nandi@hewitt.com>
@ 2006-01-12 05:07 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2006-01-12 05:07 UTC (permalink / raw)
To: Krishnendra Nandi <krishnendra.nandi@hewitt.com>; +Cc: pgsql-admin
"Krishnendra Nandi" <krishnendra.nandi@hewitt.com> 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Rule for updating ipaddress on insertion
2006-01-11 08:56 Rule for updating ipaddress on insertion Krishnendra Nandi <krishnendra.nandi@hewitt.com>
@ 2006-01-12 05:23 ` Michael Fuhr <mike@fuhr.org>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Fuhr @ 2006-01-12 05:23 UTC (permalink / raw)
To: Krishnendra Nandi <krishnendra.nandi@hewitt.com>; +Cc: pgsql-admin
On Wed, Jan 11, 2006 at 02:26:25PM +0530, Krishnendra Nandi wrote:
> 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 8.0 and later you could use inet_client_addr(). See "System
Information Functions" in the "Functions and Operators" chapter of
the documentation for other such functions.
If you just need the IP address stored somewhere, but not necessarily
in a table, then you could tweak the server's logging options.
--
Michael Fuhr
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-01-12 05:23 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-11 08:56 Rule for updating ipaddress on insertion Krishnendra Nandi <krishnendra.nandi@hewitt.com>
2006-01-12 05:07 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-12 05:23 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox