Re: How to get information of active/inactive user connection for postgresql

From: Flower Sun <sun_2002_flower(at)yahoo(dot)com>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>, Pgsql Group <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to get information of active/inactive user connection for postgresql
Date: 2003-03-19 16:59:25
Message-ID: 20030319165925.41068.qmail@web14607.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi, Ed L,
Thank you so much! You gave me the answer as what I expected.
Regards,
Jing
"Ed L." <pgsql(at)bluepolka(dot)net> wrote:On Wednesday March 19 2003 8:59, Flower Sun wrote:
>
> Do you know what's the command to get information of active/inactive user
> connection(session) for postgresql?

SELECT pg_stat_get_backend_pid(S.backendid) AS pid, db.datname AS database,
dbu.usename AS user, pg_stat_get_backend_activity(S.backendid) AS
current_query
FROM pg_user dbu, pg_database db, (SELECT pg_stat_get_backend_idset() AS
backendid) AS S,
WHERE db.oid = pg_stat_get_backend_dbid(S.backendid)
AND dbu.usesysid = pg_stat_get_backend_userid(S.backendid);

---------------------------------
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message eiannucci 2003-03-19 17:00:46 subscribe nomail
Previous Message Ed L. 2003-03-19 16:55:37 Re: How to get information of active/inactive user connection for postgresql