A row is rebuilt for a check when a field is optional, and assigning
__proto__ set the prototype instead of the field, so the check saw an
object without it.
Declarations of one table whose column names differ only past their
first 63 bytes put that one column twice in the table's MATERIALIZED
source, so PostgreSQL rejected the query as ambiguous although each
declaration ran alone. The source now names its columns, and is keyed
by its table's name, as PostgreSQL keeps them: every such declaration
reads the one column or relation, once, each with its own checks.
Streamed runs collected every repeated table while preparing, before a zero-row slice or top-k could skip it, so head(concat([t, t]), 0) pulled, died on or hung over its source. Each repeated table is now an Effect.cached collection that starts on first demand and is shared by every use in the run. The error for unknown columns names each undeclared table once.
PostgreSQL keeps the whole characters within a name's first 63 bytes, so
two columns of one relation that share them are one column to it, and the
query failed with an ambiguous reference. Fail at compile time instead,
naming both columns.
The prefix of invented names grew with the plan's names, so a 63-byte
table name made every helper name truncate to one identifier, and a
57-byte one dropped the suffixes of the tables' sources. Number the
prefix instead: __, then __1_, __2_, ... A name starts with at most one
of those, so invented names stay short and PostgreSQL keeps them whole.
Every streamed node now has at least one batch unless its columns are unknown: a declared table without batches, and a slice without rows (which reads nothing), give their result from the declared columns. A node without batches depends on an undeclared table of which no batch was read; collecting, concatenating, joining or aggregating it fails asking for the columns to be declared, instead of inventing a result without columns. Tables named more than once are read into memory as batches of the same table, so they follow the same rule.
A frame without rows is now built in one place (F.empty), with the declared nullability and no validity bitmap, which made non-nullable fields nullable.
The type of an operand built from integer literals was chosen from the
values of the current batch, so results depended on batch boundaries
and slice pushdown. A when or coalesce of literals now carries the
range of its literals; a scalar fits by its value; other operands
computed from literals count as Int32.