--查询出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_amPostgreSQL常用语句1
最新推荐文章于 2025-05-21 12:04:04 发布
本文介绍了如何使用SQL查询PostgreSQL (简称 PG) 中表的所有者信息及索引类型。通过具体的SQL语句示例,展示了如何获取t_test表的relowner属性以及特定索引的类型。

835

被折叠的 条评论
为什么被折叠?



