Skip to main content

Defined

Struct Defined 

Source
pub struct Defined {
Show 14 fields pub messages: Vec<Message>, pub result: Result<()>, pub scans: Vec<u32>, pub truncated: Vec<u32>, pub transforms: Vec<Transform>, pub fills: Vec<Fill>, pub filled: Option<u32>, pub views: Vec<u32>, pub checks: Vec<PartitionCheck>, pub detached: Vec<u32>, pub grantors: Vec<u32>, pub schema: Option<SchemaElements>, pub top_level: Option<TopLevel>, pub concurrent: Option<u32>,
}
Expand description

The result of define.

Fields§

§messages: Vec<Message>

The messages in order. The client gets them also when the statement fails.

§result: Result<()>

The result of the statement. After an error the caller discards the changes of the catalog, but the OIDs that the statement used stay used, as in PostgreSQL.

§scans: Vec<u32>

The tables that the statement read with a sequential scan, once for each scan, as pgstat_count_heap_scan counts them: the build of an index, the check of new constraints by ALTER TABLE and the check of a new foreign key. The scans count also when the statement fails.

§truncated: Vec<u32>

The tables of TRUNCATE, whose rows the caller removes after the checks pass.

§transforms: Vec<Transform>

The expressions of USING of ALTER COLUMN ... TYPE, which give the new values of the columns when the caller writes the rows of the table again.

§fills: Vec<Fill>

The defaults that the new columns of ADD COLUMN had when the subcommand ran, for each new column whose default a later subcommand of the same statement changed. The caller writes the rows of the table again with these defaults.

§filled: Option<u32>

The table of CREATE TABLE AS or the materialized view of CREATE MATERIALIZED VIEW or REFRESH MATERIALIZED VIEW, which the caller fills with the rows of the query, or None. It is None also for WITH NO DATA and for a table that exists with IF NOT EXISTS.

§views: Vec<u32>

The views whose query reads an object that the statement renamed. The catalog keeps the text of a view, so the caller writes the text again from the query that the old names give.

§checks: Vec<PartitionCheck>

The partitions of ATTACH PARTITION whose rows the caller checks against their new partition constraints after the statement, as QueuePartitionConstraintValidation queues them.

§detached: Vec<u32>

The partitions of DETACH PARTITION whose keys a foreign key refers to through the parent. Before the statement the caller checks that no row of a referencing table has a key of the partition, as ATDetachCheckNoForeignKeyRefs checks it, with the catalog before the statement.

§grantors: Vec<u32>

The roles of DROP OWNED. The caller removes the grants of membership that these roles made, as shdepDropOwned drops the rows of pg_auth_members with the role as the grantor.

§schema: Option<SchemaElements>

The elements of CREATE SCHEMA, which the caller runs after it keeps the new schema, or None.

§top_level: Option<TopLevel>

The check of PreventInTransactionBlock that the statement needs after it found its relations, such as REINDEX of a partitioned table, or None. The caller runs the check before it keeps the changes, and after an error the messages of the statement go.

§concurrent: Option<u32>

The new index of CREATE INDEX CONCURRENTLY on a table that is not temporary, or None. The first transaction of DefineIndex commits the index before the build, so after a failure of the build the caller keeps the index with indisvalid and indisready false.

Trait Implementations§

Source§

impl Debug for Defined

Source§

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

Formats the value using the given formatter. 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> 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, 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.