Expand description
Declarative partition validation, value comparison, and routing semantics.
Structs§
- Partition
Context - Partition
Tree Node - A partition and the partitioned table it belongs to.
Enums§
- Partition
Rejection - Why partition routing rejects a row. The executor reports each with a description of the row, which depends on the statement and the role that writes it.
- Partition
Route - Where a row that a statement writes through a relation is stored.
Traits§
- Partition
Catalog - Hierarchy definitions needed to validate and route a row; no storage writes are exposed.
- Partition
Expressions - Evaluate declared partition keys and bounds with the caller’s expression scope.
Functions§
- foreign_
key_ scan_ tables - The relations whose rows a foreign key reads for
table: the table and, when it is partitioned, every partition below it, each before its own partitions. The rows of a plain inheritance child belong to the child alone, asPostgreSQL’s referential queries readONLYa table that is not partitioned. - partition_
ancestor_ tables - The relation followed by each partitioned table it is a partition of, nearest first. A foreign key that references a table which is not partitioned reads
ONLYthat table, asPostgreSQL’s referential queries do, so plain inheritance parents are not among them. - partition_
bound_ order - The names of
partitions, which are siblings, in the order ofPostgreSQL’s partition descriptor: range partitions by lower bound, list partitions by their smallest value followed by a partition that holds only NULL, hash partitions by modulus and remainder, and the default partition last. - partition_
constraint_ accepts_ document - Evaluate a retained detached-partition CHECK without requiring a live parent edge. This is also the exact predicate used for prospective ATTACH row scans.
- partition_
constraint_ accepts_ row - Whether the row satisfies the partition constraint of
table, which holds the bounds of the partition and of each of its partition ancestors (ExecPartitionCheck). A relation that is not a partition accepts every row. - partition_
datum_ text - Render one bound datum of partition key type
ty. - partition_
hierarchy_ root - partition_
identity_ owner - Return the physical counter owner for legacy auto-increment metadata. Declarative partitions share the top partitioned parent’s counter; newly created SERIAL and identity columns use their durable sequence binding instead.
- partition_
key_ type - Declared type of one partition key: a column’s type, or the resolved type of a key expression over the partitioned table’s columns.
- partition_
tree - The partitions below
root, androotitself first wheninclude_rootnames a partition, each before its own partitions, with siblings in partition order. - prospective_
partition_ bound_ accepts_ document - Test one stored row against a prospective direct-child bound before the hierarchy edge is installed. DEFAULT means no existing non-default sibling accepts the row, matching the routing decision the new edge will expose.
- range_
bound_ text get_range_partbound_string: one range bound as(datum, ...), withMINVALUEandMAXVALUEspelled out.- route_
partition_ insert - Route a row that an
INSERTwrites throughrequested_table, asExecFindPartitiondoes: a partitioned table that is itself a partition first checks its own partition constraint, and each level then selects the partition whose bound accepts the row. A relation that is not partitioned stores the row itself, without a check:ExecInsertchecks the partition constraint of a partition that the statement names after its other constraints, which the caller does withpartition_constraint_accepts_row. - stored_
datum - The constant a transformed bound stores for one datum.
- transform_
partition_ bound - Transform a declared bound for a new partition of
parentinto its stored form. - validate_
hash_ partition_ spec - validate_
new_ partition_ bound - Validate that
bound, already transformed, can be added forpartitionunderparent.