您的位置:首页 > 数据库

PostgreSQL10之pg_partitioned_table视图

2018-01-09 22:58 155 查看
PostgreSQL10 新增pg_partitioned_table动态视图。
该视图可以直观查看存储的分区表信息。

NameTypeReferencesDescription
partrelid
oid
pg_class
.oid
The OID of the 
pg_class
 entry for this partitioned table
partstrat
char
 Partitioning strategy; 
l
 = list partitioned table, 
r
 = range partitioned table
partnatts
int2
 The number of columns in partition key
partattrs
int2vector
pg_attribute
.attnum
This is an array of 
partnatts
 values that indicate which table columns are part of the partition key. For example, a value of 
1 3
 would mean that the first and the third table columns make up the
partition key. A zero in this array indicates that the corresponding partition key column is an expression, rather than a simple column reference.
partclass
oidvector
pg_opclass
.oid
For each column in the partition key, this contains the OID of the operator class to use. See 
pg_opclass
 for
details.
partcollation
oidvector
pg_opclass
.oid
For each column in the partition key, this contains the OID of the collation to use for partitioning, or zero if the column is not of a collatable data type.
partexprs
pg_node_tree
 Expression trees (in 
nodeToString()
 representation) for partition key columns that are not simple column references. This is a list with one element for each zero entry in 
partattrs
. Null if all
partition key columns are simple references.
By 徐云鹤
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息