输入banner图图片脚本导航/分类

postgresql常用命令

(‘procpid‘);

61.postgresql取消转义字符功能

 将postgresql.conf文件中的standard_conforming_strings设置为on


62.查询正在执行SQL

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 <> ‘‘ 
ORDER BY 
   lap DESC;

postgresql常用命令

标签: