如果表示一个分区(见relispartition),分区边界的内部表达。 pg_class中的一些逻辑标志被以一种懒惰的方式维护:在正确状态时它们被保证为真,但是当条件不再为真时它们并不会被立刻重置为假。例如,relhasindex由CREATE INDEX设置,但它从不会被DROP INDEX清除。作为替代,VACUUM会在找到无索引表后清除其relhasindex。这...
表51.11.pg_class的列 pg_class中的一些逻辑标志被以一种懒惰的方式维护:在正确状态时它们被保证为真,但是当条件不再为真时它们并不会被立刻重置为假。例如,relhasindex由CREATE INDEX设置,但它从不会被DROP INDEX清除。作为替代,VACUUM会在找到无索引表后清除其relhasindex。这种安排避免了竞争条件并且提高了并发...
c.relispartition AS relispartition, c.relkind AS relkind FROM partition_info AS p, pg_catalog.pg_inherits AS i, pg_catalog.pg_class AS c WHERE p.relid = i.inhparent AND -- 从最顶层的分区表(即t_hash2)开始递归 c.oid = i.inhrelid AND -- 寻找子分区 c.relispartition -- 分区表标...
PG_CLASS系统表存储数据库对象信息及其之间的关系。查看某张表的oid及relfilenode:统计行存表数量:统计列存表数量:查询数据库中所有表的注释:
FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'p' AND c.relispartition = false UNION ALL SELECT inh.inhrelid AS table_oid , c.relname AS table_name , n.nspname AS schema_name , cc.relname AS table_parent_name , c.relispartition AS is_parti...
新增relispartition列,指示是否为分区表。取值说明: true :该表是分区表的一个分区。 false :该表不是分区表或者是分区表的父表。 新增relrewrite列,指示表在DDL操作期间是否具有重写规则。取值说明: true :表具有重写规则。 false :表没有定义重写规则或者不适用于重写规则。 新增relpartbound列,为pg_node_tree...
"pg_class_relname_nsp_index" UNIQUE, btree (relname, relnamespace) "pg_class_tblspc_relfilenode_index" btree (reltablespace, relfilenode) pg_partitioned_table存放有关表如何被分区的信息,partstrat表示分区类型 h = 哈希分区表,l = 列表分区表,r = 范围分区表 ...
notnull|relforcerowsecurity|boolean||notnull|relispopulated|boolean||notnull|relreplident|"char"||notnull|relispartition|boolean||notnull|relrewrite|oid||notnull|relfrozenxid|xid||notnull|relminmxid|xid||notnull|relacl|aclitem[]|||reloptions|text[]|C||relpartbound|pg_node_tree|C||Indexes...
relallvisible relfrozenxid relispartition relname relowner relrewrite reltype relam relhasindex relispopulated relnamespace relpages relrowsecurity relchecks relhasrules relisshared relnatts relpartbound reltablespace postgres-# oid IN ('1663','16394','2619','1247'); ...
relisshared boolean Its value is true if the table is shared across all database nodes in the database. Only certain system catalogs (such as PG_DATABASE) are shared. relpersistence "char" p: permanent table u: non-log table g: temporary table relkind "char" r: ordinary table i: inde...