[−][src]Enum postgres_parser::sys::ConstrType
Definitions for constraints in CreateStmt
Note that column defaults are treated as a type of constraint, even though that's a bit odd semantically.
For constraints that use expressions (CONSTR_CHECK, CONSTR_DEFAULT) we may have the expression in either "raw" form (an untransformed parse tree) or "cooked" form (the nodeToString representation of an executable expression tree), depending on how this Constraint node was created (by parsing, or by inheritance from an existing relation). We should never have both in the same node!
FKCONSTR_ACTION_xxx values are stored into pg_constraint.confupdtype and pg_constraint.confdeltype columns; FKCONSTR_MATCH_xxx values are stored into pg_constraint.confmatchtype. Changing the code values may require an initdb!
If skip_validation is true then we skip checking that the existing rows in the table satisfy the constraint, and just install the catalog entries for the constraint. A new FK constraint is marked as valid iff initially_valid is true. (Usually skip_validation and initially_valid are inverses, but we can set both true if the table is known empty.)
Constraint attributes (DEFERRABLE etc) are initially represented as separate Constraint nodes for simplicity of parsing. parse_utilcmd.c makes a pass through the constraints list to insert the info into the appropriate Constraint node.
Variants
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
not standard SQL, but a lot of people expect it
attributes for previous constraint node
attributes for previous constraint node
attributes for previous constraint node
Trait Implementations
impl Clone for ConstrType
[src]
fn clone(&self) -> ConstrType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ConstrType
[src]
impl Debug for ConstrType
[src]
impl<'de> Deserialize<'de> for ConstrType
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ConstrType
[src]
impl Hash for ConstrType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ConstrType> for ConstrType
[src]
impl Serialize for ConstrType
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ConstrType
[src]
impl StructuralPartialEq for ConstrType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstrType
impl Send for ConstrType
impl Sync for ConstrType
impl Unpin for ConstrType
impl UnwindSafe for ConstrType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,