Expand description
DDL that recreates a recorded column schema as a relation.
Used both by the in-process typechecking catalog and by the container the
explain command stages against, so it lives beside the contract rather
than inside either consumer.
A schema of ordinary types is a CREATE TABLE. A record has no data-type
syntax, so a schema containing one becomes a view over helper tables: a
relation alias in expression position plans to a record with that relationβs
field names and nullability (mz_sql::plan::query::plan_identifier), which
is the only way to spell an anonymous record in SQL.
StructsΒ§
- Stub
Names π - Allocates names for the helper relations and aliases of one stub.
- Stub
Target π - Where a stub and its helper relations are created.
EnumsΒ§
- Stub
Error π - A recorded type that cannot be turned back into a relation.
FunctionsΒ§
- build_
select π - A
SELECTwhose output columns are exactlyfields. - build_
stub_ πstatements - The statements that recreate
columnsastarget.name. - check_
reconstructible π - Reject a type the builder cannot express, naming the column that carries it.
- column_
def π "name" <type>[ NOT NULL]for a table column.