Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions coverage/syntax-postgres/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -13272,17 +13272,19 @@
"pg.dml.copy.pre-9-0-from.o068",
"pg.dml.copy.pre-9-0-from.o069",
"pg.dml.copy.pre-9-0-from.o070",
"pg.dml.copy.pre-9-0-from.o071",
"pg.dml.copy.pre-9-0-from.o072",
"pg.dml.copy.pre-9-0-from.o073",
"pg.dml.copy.pre-9-0-from.o074",
"pg.dml.copy.pre-9-0-from.o075",
"pg.dml.copy.pre-9-0-from.o076",
"pg.dml.copy.pre-9-0-from.o077",
"pg.dml.copy.pre-9-0-from.o078",
"pg.dml.copy.pre-9-0-from.o079",
"pg.dml.copy.pre-9-0-from.o080",
"pg.dml.copy.pre-9-0-from.o082",
"pg.dml.copy.pre-9-0-from.o083",
"pg.dml.copy.pre-9-0-from.o084",
"pg.dml.copy.pre-9-0-from.o085",
"pg.dml.copy.pre-9-0-from.o086",
"pg.dml.copy.pre-9-0-from.o087",
"pg.dml.copy.pre-9-0-from.o088",
"pg.dml.copy.pre-9-0-from.o089",
"pg.dml.copy.pre-9-0-from.o090",
"pg.dml.copy.pre-9-0-from.o091",
"pg.dml.copy.pre-9-0-from.o092",
"pg.dml.copy.pre-9-0-from.o093",
"pg.dml.copy.pre-9-0-from.o094",
"pg.dml.copy.pre-9-0-from.o095",
"pg.dml.copy.pre-9-0-to.o001",
"pg.dml.copy.pre-9-0-to.o002",
"pg.dml.copy.pre-9-0-to.o003",
Expand Down Expand Up @@ -28665,11 +28667,13 @@
"pg.dml.copy.pre-7-3-to.kd5017c9a2d17",
"pg.dml.copy.pre-9-0-from.k2964aacf83e2",
"pg.dml.copy.pre-9-0-from.k2e7068022853",
"pg.dml.copy.pre-9-0-from.k3b4c245dec29",
"pg.dml.copy.pre-9-0-from.k50f931ee510a",
"pg.dml.copy.pre-9-0-from.k5454e8d242cf",
"pg.dml.copy.pre-9-0-from.k6b86491468a1",
"pg.dml.copy.pre-9-0-from.k82c3472d9e24",
"pg.dml.copy.pre-9-0-from.kcf6f139a27bd",
"pg.dml.copy.pre-9-0-from.kd5f5b4aa64cf",
"pg.dml.copy.pre-9-0-from.kebf30e6459df",
"pg.dml.copy.pre-9-0-to.k11ab3a55b887",
"pg.dml.copy.pre-9-0-to.k26867824b694",
"pg.dml.copy.pre-9-0-to.k2f379917240a",
Expand Down Expand Up @@ -36788,6 +36792,7 @@
"pg.dml.copy.pre-7-3-to.kff5b5a92868f",
"pg.dml.copy.pre-9-0-from.k017e6e3dca81",
"pg.dml.copy.pre-9-0-from.k2bab96497eae",
"pg.dml.copy.pre-9-0-from.k39aa30a05292",
"pg.dml.copy.pre-9-0-from.k47377c2ebb78",
"pg.dml.copy.pre-9-0-from.k6a3db6aed162",
"pg.dml.copy.pre-9-0-from.k84e59bfe8f20",
Expand Down Expand Up @@ -41550,7 +41555,7 @@
"pg.dml.copy.from.ke23cb998ea17",
"pg.dml.copy.pre-9-0-from.k02bc79181aa5",
"pg.dml.copy.pre-9-0-from.k5419ef07a47f",
"pg.dml.copy.pre-9-0-from.k5454e8d242cf",
"pg.dml.copy.pre-9-0-from.k82c3472d9e24",
"pg.dml.copy.pre-9-0-to.k14349b203460",
"pg.dml.copy.to.k34f37b162ad2",
"pg.dml.delete.k02ab0cda496c",
Expand Down
6 changes: 3 additions & 3 deletions coverage/syntax-postgres/limits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ reason = "DEFAULT VALUES takes no column list and no OVERRIDING clause (gram.y i
[[reading]]
form = "pg.dml.copy.pre-9-0-from"
grammar_sha256 = "c8baca9f8e5e0bbf5d8a01095746e1cf206be5cbab9fb0d5256c1464eabf7c5d"
grammar = ["COPY <table_name> [ ( <column_name> [, ...] ) ] FROM { '<filename>' | STDIN } [ [ WITH ] [ BINARY ] [ DELIMITER [ AS ] '<delimiter_character>' ] [ NULL [ AS ] '<null_string>' ] [ CSV [ HEADER ] [ QUOTE [ AS ] '<quote_character>' ] [ ESCAPE [ AS ] '<escape_character>' ] [ FORCE NOT NULL <column_name> [ , <column_name> ] ] ] ]"]
reason = "the FORCE NOT NULL column list's second item written out, which the renderer otherwise copies with its keywords"
grammar = ["COPY <table_name> [ ( <column_name> [, ...] ) ] FROM { '<filename>' | STDIN } [ [ WITH ] [ BINARY ] [ DELIMITER [ AS ] '<delimiter_character>' ] [ NULL [ AS ] '<null_string>' ] [ CSV [ HEADER ] [ QUOTE [ AS ] '<quote_character>' ] [ ESCAPE [ AS ] '<escape_character>' ] [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ] ] ]"]
reason = "the FORCE NOT NULL column list's second item written out, which the renderer otherwise copies with its keywords, naming the copied list's second column; the page does not say which columns FORCE NOT NULL may name, but postgres:18.6 refuses one COPY does not copy (observed: 42P10, FORCE_NOT_NULL column \"c3\" not referenced by COPY)"

# Derived negatives that are valid PostgreSQL, across the query and dml families.

Expand Down Expand Up @@ -630,7 +630,7 @@ reason = "AS after NULL is optional in COPY's option list (gram.y copy_opt_item:
form = "pg.dml.copy.pre-9-0-from"
kind = "negative_neighbour"
target = ""
note = "the form without its required NOT in [ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
note = "the form without its required NOT in [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"
reason = "without NOT, FORCE NULL column_list is the current COPY option of that name, which the legacy option list also parses (gram.y copy_opt_item)"


Expand Down
64 changes: 40 additions & 24 deletions coverage/syntax-postgres/obligations/dml.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1080,70 +1080,70 @@ target = "'<escape_character>' in [ ESCAPE [ AS ] '<escape_character>' ]"
note = "an unquoted identifier in place of '<escape_character>'"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o071"
id = "pg.dml.copy.pre-9-0-from.o083"
kind = "option_present"
required = true
target = "[ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
target = "[ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o072"
id = "pg.dml.copy.pre-9-0-from.o084"
kind = "option_absent"
required = true
target = "[ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
target = "[ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o073"
id = "pg.dml.copy.pre-9-0-from.o085"
kind = "required_operand_missing"
required = true
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"
note = "omit <column_name>"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o074"
id = "pg.dml.copy.pre-9-0-from.o086"
kind = "operand_type_class"
required = true
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"
note = "a valid identifier"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o075"
id = "pg.dml.copy.pre-9-0-from.o087"
kind = "negative_neighbour"
required = true
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
target = "<column_name> in [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"
note = "a string literal in place of <column_name>"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o076"
id = "pg.dml.copy.pre-9-0-from.o088"
kind = "option_present"
required = true
target = "[ , <column_name> ]"
target = "[ , <copied_column_name> ]"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o077"
id = "pg.dml.copy.pre-9-0-from.o089"
kind = "option_absent"
required = true
target = "[ , <column_name> ]"
target = "[ , <copied_column_name> ]"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o078"
id = "pg.dml.copy.pre-9-0-from.o090"
kind = "required_operand_missing"
required = true
target = "<column_name> in [ , <column_name> ]"
note = "omit <column_name>"
target = "<copied_column_name> in [ , <copied_column_name> ]"
note = "omit <copied_column_name>"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o079"
id = "pg.dml.copy.pre-9-0-from.o091"
kind = "operand_type_class"
required = true
target = "<column_name> in [ , <column_name> ]"
target = "<copied_column_name> in [ , <copied_column_name> ]"
note = "a valid identifier"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o080"
id = "pg.dml.copy.pre-9-0-from.o092"
kind = "negative_neighbour"
required = true
target = "<column_name> in [ , <column_name> ]"
note = "a string literal in place of <column_name>"
target = "<copied_column_name> in [ , <copied_column_name> ]"
note = "a string literal in place of <copied_column_name>"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o061"
Expand All @@ -1164,10 +1164,10 @@ required = true
note = "the form without its required { '<filename>' | STDIN }"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o082"
id = "pg.dml.copy.pre-9-0-from.o093"
kind = "negative_neighbour"
required = true
note = "the form without its required NULL in [ FORCE NOT NULL <column_name> [ , <column_name> ] ]"
note = "the form without its required NULL in [ FORCE NOT NULL <column_name> [ , <copied_column_name> ] ]"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o066"
Expand Down Expand Up @@ -1207,6 +1207,22 @@ target = "<column_name>"
anchor = "doc.identifiers-syntax"
note = "reserved: a reserved keyword, unquoted (expected rejection) and double-quoted (expected acceptance)"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o094"
kind = "identifier_class"
required = true
target = "<copied_column_name>"
anchor = "doc.identifiers-syntax"
note = "quoted: a double-quoted identifier with blanks and mixed case"

[[obligation]]
id = "pg.dml.copy.pre-9-0-from.o095"
kind = "identifier_class"
required = true
target = "<copied_column_name>"
anchor = "doc.identifiers-syntax"
note = "reserved: a reserved keyword, unquoted (expected rejection) and double-quoted (expected acceptance)"

[[obligation]]
id = "pg.dml.copy.pre-9-0-to.o001"
kind = "positive"
Expand Down
17 changes: 17 additions & 0 deletions coverage/syntax-postgres/retired.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3715,3 +3715,20 @@ ids = [
"pg.ddl.alter-type.drop-attribute.o029",
"pg.ddl.alter-type.drop-attribute.o030",
]

[[retired]]
retired_in = "15bd5341d2355ad2d94f2938e7c6d13f85370904"
reason = "the FORCE NOT NULL list's written-out second item now names the copied list's second column, so every obligation whose target spells that item moved to a new id"
ids = [
"pg.dml.copy.pre-9-0-from.o071",
"pg.dml.copy.pre-9-0-from.o072",
"pg.dml.copy.pre-9-0-from.o073",
"pg.dml.copy.pre-9-0-from.o074",
"pg.dml.copy.pre-9-0-from.o075",
"pg.dml.copy.pre-9-0-from.o076",
"pg.dml.copy.pre-9-0-from.o077",
"pg.dml.copy.pre-9-0-from.o078",
"pg.dml.copy.pre-9-0-from.o079",
"pg.dml.copy.pre-9-0-from.o080",
"pg.dml.copy.pre-9-0-from.o082",
]
17 changes: 17 additions & 0 deletions coverage/syntax-postgres/reviews/dml.toml
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,20 @@ note = "Re-read after copied list names were counted as written, against evidenc
"pg.dml.copy.pre-9-0-from" = "bcda80f9d1e52716c42d1dbafea4eb5ac39e2bd984367fb13afef1683c21cd89"
"pg.dml.insert" = "952e8ecca0bb4eedbc3262f6391accd4427ffb81c8e055fe3fff7b1255611820"
"pg.dml.update" = "a4f255013191486714d6cb557241f5a93ed78ba8725bc044cdad85d6fd930534"

[[review]]
id = "pg-dml-018"
family = "dml"
parser_tree = "d6759f282230512069bfcf3bdc3b7b8e221f1b9e"
reviewed_utc = "2026-12-06T17:49:25Z"
verdict = "approved"
forms = [
"pg.dml.copy.pre-9-0-from",
]
note = "Re-read after FORCE NOT NULL's list was given its own second placeholder, against evidence 6d4a57ee (the merge of 3b0a3bf6, same PostgreSQL tree) and the pinned sql-copy page, whose Compatibility synopsis for COPY FROM reads [ CSV ... [ FORCE NOT NULL column_name [, ...] ] ]. The reading writes the list's second item out as <copied_column_name>, which means the same as the page's [, ...] and adds no keyword. The all-options accept case now ends ( c1 , c2 ) ... FORCE NOT NULL c1 , c2, naming only columns inside the copied list, which resolves the c3 note on pg-dml-017; it combines BINARY with CSV and DELIMITER, so it rests on the parse alone, as before, and its receipt stops at relation t1 does not exist. Single-item FORCE NOT NULL c1, and the quoted (\"c2 Q\") and quoted reserved (\"SELECT\") second items without a column list, are accepted up to the same missing table. PostgreSQL refuses each neighbour as a syntax error: FORCE NOT NULL with no column, a trailing comma, a string literal ('v1') as either item, an unquoted reserved word (SELECT) as the second item, and FORCE NOT without NULL. The 11 obligations against the old item are retired in one group and reissued under new ids; all 74 required obligations are met. That FORCE NOT NULL takes only copied columns is a server check (42P10, FORCE_NOT_NULL column not referenced by COPY), not something the page documents; the limit's reason now says so, and no recorded receipt reaches that check. The earlier approval (pg-dml-017) stands."

[review.fingerprints]
"pg.dml.copy.pre-9-0-from" = "0cdf2478f5933a7f8634d3a3ffd929da99f84bb6a149f3dac539ed03e97d6ead"

[review.definitions]
"pg.dml.copy.pre-9-0-from" = "64cb82ab61f01144ddfceacf07d744f76d41ad6ee5a4f5203be9b5b342a7abe7"
4 changes: 2 additions & 2 deletions evidence.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ commit = "fa4ccd4dc55cb2d1fb2d37236c35b8b755045001"
content_sha256 = "f13351d7a05110c9eb509d3db70557bf4bae66eae0c129b05d65e6a04d540783"

[pins.postgres]
commit = "6178ce4134a25aed24f8f4cdfac1f9df8b270ec3"
content_sha256 = "0e387d19fbebfe8ff7f273e8837e1f0902b3622729d38e2660d3cbc1e9f4f1de"
commit = "6d4a57ee1d6d70023904e106ff7cf7e5d51bbcb7"
content_sha256 = "019db3ba4b26c12fbf3d8a92f4d43b46a1fa58d68a10f2bd9de0278f5153b241"

[pins.snowflake]
commit = "9c471bfeb654c7283a28804d15c3ea26ab0b8ac9"
Expand Down
1 change: 1 addition & 0 deletions scripts/syntax_obligations_postgres/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
'"char"[]': "'{a}'",
}
FORM_FILLS: dict[str, dict[str, str]] = {
"pg.dml.copy.pre-9-0-from": {"copied_column_name": "c2"},
"pg.functions.aggregate.grouping": {"group_by_expression(s)": "c"},
"pg.functions.json.json-to-record": {"json": "JSON '{\"a\":1}'"},
"pg.functions.json.json-to-recordset": {"json": "JSON '[{\"a\":1}]'"},
Expand Down
Loading