Re: any way to query for current connections to db? - Mailing list pgsql-general

From volunteer@spatiallink.org
Subject Re: any way to query for current connections to db?
Date
Msg-id 20071109160027.b22b5ede89d48a4249261b5ab56693f4.5998f257a5.wbe@email.secureserver.net
Whole thread Raw
In response to any way to query for current connections to db?  ("Coarr, Matt" <mcoarr@mitre.org>)
List pgsql-general
select
 *
from
 pg_stat_activity
where
 datname = (
 select
  *
 from
  current_database()
 );

-------- Original Message --------
Subject: [GENERAL] any way to query for current connections to db?
From: "Coarr, Matt" <mcoarr@mitre.org>
Date: Fri, November 09, 2007 5:36 pm
To: <pgsql-general@postgresql.org>

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


pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: any way to query for current connections to db?
Next
From: "Jeff Larsen"
Date:
Subject: Re: any way to query for current connections to db?