pub fn build_default_expr(
node: &NodeEnum,
target_type: Option<&ColumnType>,
default_schema: Option<&Identifier>,
location: &SourceLocation,
) -> Result<DefaultExpr, ParseError>Expand description
Convert a column-default expression node into a DefaultExpr.
Recognizes:
- Bare
AConstinteger/float/string/bool/null literals →DefaultExpr::Literal. nextval('seq')andnextval('schema.seq')→DefaultExpr::Sequence.- Anything else →
DefaultExpr::Exprvia the normalizer.
target_type enables redundant-cast stripping in the Expr arm.