471,073 Members | 1,299 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Retrieve ip client from postgres

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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
2 6574
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

Nov 23 '05 #2
OK
thank you
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



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by warwick.poole | last post: by
1 post views Thread by Reuben D. Budiardja | last post: by
1 post views Thread by Carlos Correia | last post: by
7 posts views Thread by =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.