Skip to main content

clone_parent_keys

Function clone_parent_keys 

Source
pub fn clone_parent_keys<'a>(
    catalog: &'a dyn IndexNameCatalog,
    table: &mut CreateTable,
    inherited: &InheritedDefinitions,
    allocate: &mut CatalogIdentityAllocator<'_>,
) -> Result<ConstraintIndexNamer<'a>, SQLError>
Expand description

The keys a partition clones from its parent, which DefineRelation creates before the table’s CHECK constraints: each unique index cloned from the parent is checked against the table’s own partition key, and each cloned key’s index is named, a name the CHECKs the table inherits hold being taken, and takes its OIDs; then CloneForeignKeyConstraints creates the partition’s copies of the parent’s foreign keys. The namer goes on to name the declared keys.