Jim C. Nasby wrote:
>SELECT * FROM pg_stat_activity;
>
>Note that if you turn on stats_command_string you'll also be able to see
>what each connection is doing if you're connected as a superuser.
>
>
>
>
Just as a little FYI, on 8.1 pg_stat_activity will show the IP address
and port as well, but only on 8.1.
Tony