Skip to main content

Module foreign_keys

Module foreign_keys 

Source
Expand description

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’s tryAttachPartitionForeignKey and addFkConstraint decide.

Enums§

DeclaredForeignKey
A foreign key of a declaration, by the catalog row it publishes.

Functions§

attachable_foreign_key
The foreign key of partition that parent_key attaches among candidates, the partition’s foreign keys that copy none of its parent’s, in name order: the first that references the same key through the same columns with the same deferrability, actions and match type. A candidate that differs from parent_key in enforceability alone is an error, as PostgreSQL refuses to attach it or to add a second constraint beside it.
declared_foreign_key_families
The object identities of the foreign keys a declaration holds, which its partitions’ copies share.
partition_foreign_key_copy
A partition’s copy of parent_key, which keeps the parent’s name unless one of the partition’s constraints in used holds it, when it takes the parent’s name with the first numeric suffix that no constraint of the partition’s schema, in schema, holds, as PostgreSQL’s addFkConstraint names it.
rejoin_foreign_key_families
Move the foreign keys of a declaration whose families joined others into those families: the copies of a foreign key that a partition attached to its parent’s follow it. Reports whether any moved.