Re: is max connections in a database table somewhere - Mailing list pgsql-general

From Greg Smith
Subject Re: is max connections in a database table somewhere
Date
Msg-id 4E43442D.5000402@2ndQuadrant.com
Whole thread Raw
In response to is max connections in a database table somewhere  (Geoffrey Myers <geof@serioustechnology.com>)
Responses Re: is max connections in a database table somewhere  (Diego Augusto Molina <diegoaugustomolina@gmail.com>)
Re: is max connections in a database table somewhere  (Geoffrey Myers <lists@serioustechnology.com>)
List pgsql-general
On 08/10/2011 02:46 PM, Geoffrey Myers wrote:
> Is the max connections value in a system table somewhere?

If you intend to do anything with the value you probably want one of
these forms:

SELECT CAST(current_setting('max_connections') AS integer);
SELECT CAST(setting AS integer) FROM pg_settings WHERE
name='max_connections';

The setting comes back as a text field when using current_setting on the
pg_settings view (which isn't a real table, under the hood it's calling
a system function)

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: postgresql server crash on windows 7 when using plpython
Next
From: AI Rumman
Date:
Subject: Convert mysql to postgresql