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

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Rob Richardson *EXTERN*" <RDRichardson(at)rad-con(dot)com>, <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 07:27:17
Message-ID: D960CB61B694CF459DCFB4B0128514C20800B919@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

As far as I know, you'd have to write a function
in C, PL/PerlU or something similar that runs an OS
command for you.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-06-14 07:33:07 Re: How to create c language in postgresql database. Thanks.
Previous Message utsav 2012-06-14 06:10:53 RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION