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

From: volunteer(at)spatiallink(dot)org
To: pgsql-general(at)postgresql(dot)org
Cc: "Coarr,Matt" <mcoarr(at)mitre(dot)org>
Subject: Re: any way to query for current connections to db?
Date: 2007-11-09 23:00:27
Message-ID: 20071109160027.b22b5ede89d48a4249261b5ab56693f4.5998f257a5.wbe@email.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mitre(dot)org>
Date: Fri, November 09, 2007 5:36 pm
To: <pgsql-general(at)postgresql(dot)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

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-11-09 23:01:15 Re: any way to query for current connections to db?
Previous Message Scott Marlowe 2007-11-09 22:58:16 Re: any way to query for current connections to db?