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

Re: Is there anyway to retrieve server name and/or ip from query

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chris Hoover <revoohc(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Is there anyway to retrieve server name and/or ip from query
Date: 2005-07-29 14:00:29
Message-ID: 200507291400.j6TE0Tl24281@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Chris Hoover wrote:
> Subject pretty much says it all.  Is there a way in a sql query to
> have it return the server name and/or the server ip address of the
> PostgreSQL server?

8.0 has such informix via functions:
	
	test=> \df *server*
	                           List of functions
	   Schema   |       Name       | Result data type | Argument data types
	------------+------------------+------------------+---------------------
	 pg_catalog | inet_server_addr | inet             |
	 pg_catalog | inet_server_port | integer          |
	(2 rows)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-admin by date

Next:From: Michael FuhrDate: 2005-07-29 14:15:31
Subject: Re: Is there anyway to retrieve server name and/or ip from query
Previous:From: Tom LaneDate: 2005-07-29 13:52:19
Subject: Re: start postgresql8 with -o "-i" option

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