Schema: name what the startup check does not prove

Soul pass 7, S7-2. The out-of-scope list named CHECK constraints, triggers
and row-level security. It now also names unique indexes beyond or
stricter than the required keys (including leftovers of an interrupted
concurrent build, which are enforced once ready), NOT NULL columns the
schema does not declare and that have no default, and column-level SELECT
under SELECT * or RETURNING *, which needs every column of the table.
Documentation only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 22:52:40 +02:00
commit 588739857a

View file

@ -187,8 +187,15 @@ function keyColumns(line: string, keyword: "PRIMARY KEY" | "UNIQUE"): string | u
* speed lookups are not required; the unique ones are, by shape, in
* REQUIRED_KEYS.
*
* Out of scope: CHECK constraints, triggers and row-level security. Each can
* make a write fail on a database that passes this check.
* Out of scope, each able to make a write fail on a database that passes the
* check: CHECK constraints; triggers; row-level security; unique indexes
* beyond the required keys, or stricter than them, including the leftovers of
* an interrupted concurrent index build (a valid extra one refuses rows the
* store expects to write, and even an invalid one that is ready is enforced
* on writes); NOT NULL columns the schema does not declare and that have no
* default, which the store's INSERTs leave out; and SELECT granted column by
* column when a statement reads `SELECT *` or `RETURNING *`, which needs
* SELECT on every column the table has, not only the declared ones.
*/
/** Every table the schema creates. */