Page 1 of 1

Problem with this pgsql-Query

Posted: Tue 30 Jun 2009 14:27
by liebehenz

Code: Select all

SELECT d.oid AS datid, d.datname, pg_stat_get_backend_pid(s.backendid) AS 
        procpid, pg_stat_get_backend_userid(s.backendid) AS usesysid, u.usename, 
        pg_stat_get_backend_activity(s.backendid) AS current_query, 
        pg_stat_get_backend_activity_start(s.backendid) AS query_start, 
        pg_stat_get_backend_start(s.backendid) AS backend_start, 
        pg_stat_get_backend_client_addr(s.backendid) AS client_addr, 
        pg_stat_get_backend_client_port(s.backendid) AS client_port 
           FROM pg_database d, ( SELECT pg_stat_get_backend_idset() AS backendid) s, 
        pg_shadow u 
          WHERE pg_stat_get_backend_dbid(s.backendid) = d.oid AND 
        pg_stat_get_backend_userid(s.backendid) = u.usesysid; 

First Error is need an transaction,
than in an transaction, large object doesnt exist... :(

Can you help me? :roll:

Thanks
Uwe

Posted: Tue 30 Jun 2009 14:31
by Plash
Set OIDAsInteger option of TPgQuery to True.