微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PostgreSQL常用语句1

--查询出t_test表的relowner
select c.relname,c.relowner,a.rolname 
from pg_class c,pg_authid a where c.relowner=a.oid and c.relname='t_test';

--查询出某个索引的索引类型:
select c.relname,a.amname from pg_class c,pg_am a
where c.relam=a.oid and c.relname='tab_lei_1_c2_idx'

--查询出PG索引的类型:
select oid,* from pg_am

原文地址:https://www.jb51.cc/postgresql/193104.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐