Skip site navigation (1) Skip section navigation (2)

Re: Obtaining client IP address

From: Alexis Paul Bertolini <bertolini(at)computer(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Obtaining client IP address
Date: 2006-02-25 09:26:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Michael Fuhr wrote:
> On Sat, Feb 25, 2006 at 12:16:31AM +0100, Alexis Paul Bertolini wrote:
>> The client has no idea what public IP it has. The server ought to 
>> know... however I haven't found how I could get this info into my query.
> What version of PostgreSQL are you running?  In 8.0 and later you
> can use inet_client_addr().
> I forget if earlier versions have a way to get the client's IP
> address without resorting to hacks (e.g., writing a function in a
> privileged language like plperlu and calling netstat or lsof).
Mmmm, I didn't spot that one, but it did the trick! Thanks!


In response to

pgsql-sql by date

Next:From: Richard CDate: 2006-02-25 10:42:57
Subject: Re: "Installing" dbLink
Previous:From: Achilleus MantziosDate: 2006-02-25 07:40:28
Subject: Re: After Trigger assignment to NEW

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group