Search Postgresql Archives

Re: Fetching Server configured port from C Module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux