PostgreSQL10之pg_partitioned_table视图

本文介绍了PostgreSQL 10中新增的pg_partitioned_table动态视图,该视图提供了分区表的详细信息,包括分区策略、分区键等。有助于更好地管理和理解数据库中的分区表。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

作者:瀚高PG实验室 (Highgo PG Lab)-徐云鹤
PostgreSQL10 新增pg_partitioned_table动态视图。
该视图可以直观查看存储的分区表信息。
NameTypeReferencesDescription
partrelidoidpg_class.oidThe OID of the pg_class entry for this partitioned table
partstratcharPartitioning strategy; l = list partitioned table, r = range partitioned table
partnattsint2The number of columns in partition key
partattrsint2vectorpg_attribute.attnumThis 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.
partclassoidvectorpg_opclass.oidFor each column in the partition key, this contains the OID of the operator class to use. See pg_opclass for details.
partcollationoidvectorpg_opclass.oidFor 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.
partexprspg_node_treeExpression 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值