Function mz_sql::plan::query::plan_values_insert

source ยท
fn plan_values_insert(
    qcx: &QueryContext<'_>,
    target_names: &[&ColumnName],
    target_types: &[&ScalarType],
    values: &[Vec<Expr<Aug>>],
) -> Result<HirRelationExpr, PlanError>
Expand description

Plans a VALUES clause that appears at the top level of an INSERT statement.

This is special-cased in PostgreSQL and different enough from plan_values that it is easier to use a separate function entirely. Unlike a normal VALUES clause, each value is coerced to the type of the target table via an assignment cast.

See: https://github.com/postgres/postgres/blob/ad77039fa/src/backend/parser/analyze.c#L504-L518