any api in libpq to get the number of connections

Started by surabhi.ahujaover 19 years ago2 messagesgeneral
Jump to latest
#1surabhi.ahuja
surabhi.ahuja@iiitb.ac.in

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

#2Shoaib Mir
shoaibmir@gmail.com
In reply to: surabhi.ahuja (#1)
Re: any api in libpq to get the number of connections

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)

Show quoted text

On 12/12/06, surabhi.ahuja <surabhi.ahuja@iiitb.ac.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.