Re: any api in libpq to get the number of connections

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: surabhi(dot)ahuja <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: any api in libpq to get the number of connections
Date: 2006-12-12 09:55:40
Message-ID: bf54be870612120155o7d91d94dg1d131b0ac2fb9fac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This might be of some help using a query like:

select count(*) as NumberOfConn from pg_stat_activity where datname =
'dbname';

--------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 12/12/06, surabhi.ahuja <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in> wrote:
>
> Hi,
> is ther any api avaiable in libpq
> so that i can get the number of connections that exists with the database
>
> thanks,
> regards
> surabhi
>
> This message has been scanned by the Trend Micro IGSA and found to be free of known security risks.
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-12-12 09:58:53 Re: Restore database from files (not dump files)?
Previous Message surabhi.ahuja 2006-12-12 09:31:12 any api in libpq to get the number of connections