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

From: Hellmuth Vargas <hivs77(at)gmail(dot)com>
To: "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 21:55:57
Message-ID: CAN3Qy4rb+cM0=G7MHUcOW0iyVp+5K2LNreajmaUy-v_pC5PmNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

SELECT inet_server_addr();

On Thu, Jun 14, 2012 at 4:43 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info>wrote:

> On Thu, 2012-06-14 at 04:33 +0000, 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?
> >
>
> You can have its IP address, but not its name, unless you write a C or
> PL/perlU function.
>
>
> --
> Guillaume
> http://blog.guillaume.lelarge.info
> http://www.dalibo.com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
Cordialmente,

Ing. Hellmuth I. Vargas S.
Esp. Telemática y Negocios por Internet
PostgreSQL DBA

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2012-06-14 22:15:04 Re: Empty arrays vs. NULLs, 9.1 & 8.3
Previous Message Guillaume Lelarge 2012-06-14 21:43:44 Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?