Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Rob Richardson <RDRichardson(at)rad-con(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?
Date: 2012-06-14 16:17:42
Message-ID: 4FDA0EA6.9050204@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/13/2012 09:33 PM, Rob Richardson wrote:
>
> My customer has 3 computers. The PostgreSQL service could be running
> on either of two of them. There is currently no way in our system to
> determine which one it is running on. The third computer sometimes
> needs to know which of the other two computers is active. It would be
> enough to know which computer is running the PostgreSQL service. Is
> the name of the server available in a PostgreSQL database, so that it
> could be retrieved using a query?
>
>
I am unaware of any such query. However "show listen_addresses;" might
allow you to achieve your goal.

Cheers,
Steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Haas 2012-06-14 17:32:21 Re: Namespace of array of user defined types is confused by the parser in insert?
Previous Message Alex Lai 2012-06-14 16:15:31 Submit query using dblink that hung the host