pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedGet postgresql server ip address
3+ messages / 3 participants
[nested] [flat]
* Get postgresql server ip address
@ 2011-02-08 10:28 Gera Mel Handumon <geramel.h@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Gera Mel Handumon @ 2011-02-08 10:28 UTC (permalink / raw)
To: pgsql-sql
Hello,
Is it possible to get postgresql server ip address using sql command?
TIA,
Geramel
-----------------------------------------------------------------
"Share your knowledge. It's a way to achieve immortality" - Dalai Lama
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Get postgresql server ip address
@ 2011-02-08 14:56 Dmitriy Igrishin <dmitigr@gmail.com>
parent: Gera Mel Handumon <geramel.h@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Dmitriy Igrishin @ 2011-02-08 14:56 UTC (permalink / raw)
To: Gera Mel Handumon <geramel.h@gmail.com>; +Cc: pgsql-sql
2011/2/8 Gera Mel Handumon <geramel.h@gmail.com>
> Hello,
>
> Is it possible to get postgresql server ip address using sql command?
>
Oh yes, use inet_server_addr() function. Please note, that NULL is returned
if connection established via socket.
>
> TIA,
>
> Geramel
>
>
> -----------------------------------------------------------------
> "Share your knowledge. It's a way to achieve immortality" - Dalai Lama
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
--
// Dmitriy.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Get postgresql server ip address
@ 2011-02-08 15:30 Chris Browne <cbbrowne@acm.org>
parent: Gera Mel Handumon <geramel.h@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Chris Browne @ 2011-02-08 15:30 UTC (permalink / raw)
To: pgsql-sql
geramel.h@gmail.com (Gera Mel Handumon) writes:
> Is it possible to get postgresql server ip address using sql command?
You can get the IP address tied to a specific connection...
See the function inet_server_port().
Note, however, that the server may have a multiplicity of IP addresses,
so this may only be a partial answer.
--
output = ("cbbrowne" "@" "gmail.com")
"A lot of people come to this newsgroup and do nothing but complain
about Lisp. I think maybe they are such heavy complainers that they
think they read comp.lain.lisp." -- Erik Naggum
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-02-08 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 10:28 Get postgresql server ip address Gera Mel Handumon <geramel.h@gmail.com>
2011-02-08 14:56 ` Dmitriy Igrishin <dmitigr@gmail.com>
2011-02-08 15:30 ` Chris Browne <cbbrowne@acm.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