Expand description
Column default validation and binding, as cookDefault analyzes a default: the expression is checked for what a default cannot contain, reduced to a constant when it is one, and coerced to the column’s type in assignment context.
Functions§
- bind_
stored_ schema_ expression - Bind a copy of stored schema expression syntax and carry its exact routine identities, user-defined type identities and enum constants back into the syntax.
typed_expressionis the syntax with its column references replaced by typed placeholders. - check_
assignable coerce_to_target_typein assignment context: the expression’s type must have an assignment cast to the column’s type.- cook_
constant - Reduce a default that is a constant as parse analysis reduces it: an
unknownliteral is read by the column type’s input function and stored as a constant of that type, a cast of a literal is read by the cast’s type, and a NULL constant leaves no default. Returns whether a default remains. - validate_
default_ expression - Analyze a default as
cookDefaultdoes and bind it for storage.columnnames the column, or the domain, the default belongs to. Returns whether the default remains: a default that cooks to a NULL constant is dropped, asAddRelationNewConstraintsandDefineDomainstore no default for it.