Skip to main content

TableHierarchy

Struct TableHierarchy 

Source
pub struct TableHierarchy {
    pub parents: Vec<String>,
    pub parent_sequence_numbers: Vec<i32>,
    pub partition_spec: Option<PartitionSpec>,
    pub partition_bound: Option<PartitionBound>,
    pub local_columns: Vec<String>,
    pub partition_identity_overrides: Vec<PartitionIdentityOverride>,
    pub partition_inherited_key_constraints: Vec<TableKeyConstraint>,
    pub partition_inherited_foreign_keys: Vec<ForeignKey>,
}
Expand description

Metadata shared by ordinary inheritance and declarative partitioning.

Fields§

§parents: Vec<String>

Direct parents in declaration order. Names are parse-time identities in the statement AST and canonical catalog identities after registration.

§parent_sequence_numbers: Vec<i32>

Durable pg_inherits.inhseqno values aligned with parents. Catalogs written before ALTER inheritance support leave this empty and therefore use the declaration-order sequence 1..=parents.len().

§partition_spec: Option<PartitionSpec>

Partition key owned by a partitioned relation.

§partition_bound: Option<PartitionBound>

Bound owned by a child declared with PARTITION OF.

§local_columns: Vec<String>

Columns declared by this relation before inherited columns were merged into its stored row type. PostgreSQL exposes this provenance through pg_attribute.attislocal; keeping it in durable hierarchy metadata distinguishes an explicitly redeclared inherited column from a purely inherited one after reopen.

§partition_identity_overrides: Vec<PartitionIdentityOverride>

Original local sequence metadata hidden while an attached partition uses a parent’s identity generator. PostgreSQL keeps a pre-existing SERIAL default and restores its behavior after DETACH.

§partition_inherited_key_constraints: Vec<TableKeyConstraint>

Key constraints materialized during partition attachment. Local catalog identities bind provenance to the retained rows through schema changes; detachment clears external provenance while preserving the constraints.

§partition_inherited_foreign_keys: Vec<ForeignKey>

Foreign keys materialized during partition attachment. Local catalog identities bind provenance to each row; detachment retains the rows and separates their enforcement family from the former parent.

Implementations§

Trait Implementations§

Source§

impl Clone for TableHierarchy

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableHierarchy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TableHierarchy

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TableHierarchy

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TableHierarchy

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.