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

猜你喜欢

转载自blog.csdn.net/msdnchina/article/details/80086107