Litao Wu <[EMAIL PROTECTED]> writes:
> How about:

> select c.relname, l.pid, l.mode, l.granted,
> a.current_query
> from pg_locks l, pg_class c, pg_stat_activity a
> where
>   l.relation = c.oid
>   AND l.pid =  a.procpid
> order by l.granted, l.pid;

You can't join to pg_class without eliminating the transaction lock rows
(because they have NULLs in the relation field).

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to