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

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?
Дата
Msg-id 4FDA0EA6.9050204@pinpointresearch.com
обсуждение исходный текст
Ответ на Is there a way to ask PostgreSQL for the name of the computer it's running on?  (Rob Richardson <RDRichardson@rad-con.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem installing extensions on Lion
Следующее
От: Alex Lai
Дата:
Сообщение: Submit query using dblink that hung the host