X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 20CD752998 for ; Fri, 29 Jul 2005 11:00:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47813-04 for ; Fri, 29 Jul 2005 14:00:26 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id BD038529C0 for ; Fri, 29 Jul 2005 11:00:25 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j6TE0Tl24281; Fri, 29 Jul 2005 10:00:29 -0400 (EDT) From: Bruce Momjian Message-Id: <200507291400.j6TE0Tl24281@candle.pha.pa.us> Subject: Re: Is there anyway to retrieve server name and/or ip from query In-Reply-To: <1d219a6f05072906482b1d37c4@mail.gmail.com> To: Chris Hoover Date: Fri, 29 Jul 2005 10:00:29 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/244 X-Sequence-Number: 18300 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@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073