Expand description
Column-level diffing inside an AlterTable.
Pairs columns by name. Logical column order is intentionally not enforced in v0.1 — the IR records it, but reordering would require a table rewrite. If the user wants a specific physical order, they must drop and recreate the table.
§Widening whitelist
is_widening returns true only for type changes Postgres can perform
without rewriting data: int2 → int4 → int8, varchar(N) → varchar(M>N),
varchar(*) → text. Everything else is conservative and tagged
Destructiveness::RequiresApprovalAndDataLossWarning.
Functions§
- diff_
columns - Diff columns in
targetagainstsource, appending entries toout.