Search Postgresql Archives

Re: any way to query for current connections to db?

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

 



select
 *
from
 pg_stat_activity
where
 datname = (
 select
  *
 from
  current_database()
 );

-------- Original Message --------
Subject:  any way to query for current connections to db?
From: "Coarr, Matt" <mcoarr@xxxxxxxxx>
Date: Fri, November 09, 2007 5:36 pm
To: <pgsql-general@xxxxxxxxxxxxxx>

Hi,
 
Is there any way to query the database to identify what the current
connections are (connections, sessions, or whatever you want to call
them)?
 
This would be something similar to oracle's v$session view.
 
Thanks,
Matt


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[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