77;20202;0ccatbody - よくきたWiki

Loading ...

#navi(contents-page-name): No such page: PostgreSQL

SELECT
    procpid,
    start,
    now() - start AS lap,
    current_query
FROM
    (SELECT
        backendid,
        pg_stat_get_backend_pid(S.backendid) AS procpid,
        pg_stat_get_backend_activity_start(S.backendid) AS start,
        pg_stat_get_backend_activity(S.backendid) AS current_query
    FROM
        (SELECT pg_stat_get_backend_idset() AS backendid) AS S
    ) AS S
WHERE
    current_query <> '<IDLE>'
ORDER BY
    lap DESC;

SELECT
    n.nspname as "Schema",
    c.relname as "Name",
    CASE
        c.relkind
        WHEN 'r' THEN 'table'
        WHEN 'v' THEN 'view'
        WHEN 'i' THEN 'index'
        WHEN 'S' THEN 'sequence'
        WHEN 's' THEN 'special'
    END AS "Type",
    r.rolname as "Owner"
FROM
    pg_catalog.pg_class c
    JOIN
        pg_catalog.pg_roles r ON r.oid = c.relowner
    LEFT JOIN
        pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE
    c.relkind IN ('r','v','S','') AND
    n.nspname NOT IN ('pg_catalog', 'pg_toast') AND
    pg_catalog.pg_table_is_visible(c.oid)
ORDER BY
    1,2;

リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS
最終修正日時: Tue, 27 May 2008 20:43:00 JST (5109d)
文字数(HTML): 1110
文字数(Wiki): 1353
人気ブログランキング - よくきた wiki