Expand description
CREATE TABLE inheritance and partition row-type preparation.
Modules§
- alter
- ALTER inheritance and partition declaration rules over immutable column and constraint definitions.
- detachment
- Preserve local constraint rows while separating detached foreign-key enforcement families.
- foreign_
keys - The foreign keys a partition holds for the foreign keys of its partitioned parent: an equivalent foreign key of its own that it attaches, or a copy, as
PostgreSQL’stryAttachPartitionForeignKeyandaddFkConstraintdecide. - origins
- Track whether NOT NULL and CHECK declarations are local after a hierarchy edge changes.
- restoration
- Retain local schema objects when legacy hierarchy edges lose their parent.
Structs§
- Inheritance
Context - Merged
Parents - What
MergeAttributeshands the steps that follow it: the columns whose default or generation expression a parent gives, and the NOT NULL constraints the parents give.
Traits§
- Inheritance
Catalog - Parent lookup and constraint declarations used while assembling a new row type.
Functions§
- bind_
create_ table_ partitioning - The bound of a new partition and the partition key of a new partitioned table, in
DefineRelationorder:transformPartitionBoundandcheck_new_partition_boundbeforeComputePartitionAttrs. - inheritance_
parent_ target - The parent relation that
INHERITSnames:table_openrvrefuses indexes and composite types, andMergeAttributesaccepts only tables. Foreign tables are not inheritance parents here. - merge_
create_ table_ hierarchy MergeAttributes: the columns, CHECK constraints and partition keys a new table inherits from its parents, ahead of its own, with the notices that report each merged column.DefineRelationfirst looks up every parent, rejecting one named twice; the table’s own columns cannot repeat a name. The table’s partition key and bound are bound bybind_create_table_partitioningonce its row type is described, asDefineRelationcomputes them after creating the relation.- merge_
same_ column