Skip to content

fix(postgres): name a copied column in the legacy COPY form's FORCE NOT NULL list - #535

Open
kvlonge wants to merge 6 commits into
mainfrom
fix/postgres-copy-force-not-null
Open

kvlonge wants to merge 6 commits into
mainfrom
fix/postgres-copy-force-not-null

Conversation

@kvlonge

@kvlonge kvlonge commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Why

After distinct list items (#530), the legacy COPY form wrote its FORCE NOT NULL list's second item as c3, a column the copied list ( c1 , c2 ) does not contain. PostgreSQL refuses that (42P10: FORCE_NOT_NULL column "c3" not referenced by COPY), so the case was not testing the syntax honestly.

Changes

  • limits.toml: the pg.dml.copy.pre-9-0-from reading writes the item as <copied_column_name>, filled with c2. Its reason says the restriction is observed server behaviour, not documented on the page. The NOT suppression follows the new target.
  • Obligations o071–o080 and o082 are retired; o083–o095 replace them.
  • The PostgreSQL evidence pin moves to sqlbabel-evidence feat: DuckShop batches 1 and 2, 52 more models matching Snowflake #47: the cases follow the new ids, and 3 receipts are appended (recorded twice on postgres:18.6, matching).
  • A re-read review record for the form.
  • baseline.json re-recorded.

Verification

  • Builder --check against the pin: 0 stale.
  • PostgreSQL: 1,555/1,555 forms verified, 0 problems; 23,713/23,713 obligations.
  • New verdicts: the reject case is refused by the parser (42601); the two accept cases pass the parser (42P01, missing table).
  • Only this form's cases change.

…OT NULL list

The legacy COPY form's reading writes the FORCE NOT NULL list's second item out, and with distinct
list items it was numbered past the copied list's columns, naming c3, which COPY does not copy. The
item now has its own placeholder, filled with c2. The eleven obligations whose targets spell the
item move to new ids, and the reading's NOT suppression follows the new target.
… cases

The reading's reason now states the copied-column restriction as the server's observed refusal
(42P10) rather than as something the page documents.
Approves pg.dml.copy.pre-9-0-from against the pinned sql-copy page and
the evidence pin 6d4a57ee, with every required obligation met.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant