Retrieve ip client from postgres

Started by Mario A. Soto Cordonesover 21 years ago3 messagesgeneral
Jump to latest
#1Mario A. Soto Cordones
mario_soto@venezolanadeavaluos.com

Hi,
How can i get the Client Host name/IP Address for the current
connection(session). Is there any function or system table(view) which
will these details.

Thank

#2Michael Fuhr
mike@fuhr.org
In reply to: Mario A. Soto Cordones (#1)
Re: Retrieve ip client from postgres

On Fri, Nov 05, 2004 at 04:21:52PM -0400, Mario A. Soto Cordones wrote:

How can i get the Client Host name/IP Address for the current
connection(session). Is there any function or system table(view) which
will these details.

In 8.0 you'll be able to use inet_client_addr(). I don't think you
could get this info in earlier versions, although I recall seeing
an user-defined function that somebody had written. Use a search
engine and see if anything comes up.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#3Mario A. Soto Cordones
mario_soto@venezolanadeavaluos.com
In reply to: Michael Fuhr (#2)
Re: Retrieve ip client from postgres

OK
thank you

Show quoted text

On Fri, Nov 05, 2004 at 04:21:52PM -0400, Mario A. Soto Cordones wrote:

How can i get the Client Host name/IP Address for the current
connection(session). Is there any function or system table(view) which
will these details.

In 8.0 you'll be able to use inet_client_addr(). I don't think you
could get this info in earlier versions, although I recall seeing
an user-defined function that somebody had written. Use a search
engine and see if anything comes up.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings