Re: Fetching Server configured port from C Module

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Fetching Server configured port from C Module
Дата
Msg-id 20130417194929.GK4602@momjian.us
обсуждение исходный текст
Ответ на Re: Fetching Server configured port from C Module  (Mike Roest <mike.roest@replicon.com>)
Ответы Re: Fetching Server configured port from C Module
Список pgsql-general
On Wed, Apr 17, 2013 at 01:32:00PM -0600, Mike Roest wrote:
>
>
>
>     SHOW PORT;
>
>  test=> SELECT setting FROM pg_settings WHERE name = 'port';
>          setting
>         ---------
>          5432
>
> Both of these are from a query context.  This is in a C module, I suppose I
> could run a query but there has to be a direct C function to get this data.

Well, you could look at how to access the PostPortNumber global
variable.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


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

Предыдущее
От: Mike Roest
Дата:
Сообщение: Re: Fetching Server configured port from C Module
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: How large can a PostgreSQL database get?