postgresql常用命令

2021-03-08 22:21:56 浏览数 (1)

解决postgresql数据库数据表锁死问题

1、查询锁死表的pid select pid from pg_locks where relation in (select oid from pg_class where relname='表名'); 2、解锁数据表 select pg_terminate_backend('上一步查询到的pid');

postgresql中没有dual表解决方案

CREATE OR REPLACE VIEW dual AS SELECT NULL::"unknown" WHERE 1 = 1;

ALTER TABLE dual OWNER TO jxdx; GRANT ALL ON TABLE dual TO jxdx; GRANT SELECT ON TABLE dual TO public;

0 人点赞