LucaCappelletti94 opened a new pull request, #3025:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3025

   `ALTER TABLE r ALTER CONSTRAINT f DEFERRABLE INITIALLY DEFERRED` failed with 
`Expected: SET/DROP NOT NULL, SET DEFAULT, SET DATA TYPE, ADD GENERATED, or 
OPTIONS after ALTER COLUMN, found: f`, because the parser read `CONSTRAINT` as 
a column name with `COLUMN` omitted.
   
   This PR adds `AlterTableOperation::AlterConstraint` for the two forms of the 
[PostgreSQL 
synopsis](https://www.postgresql.org/docs/current/sql-altertable.html), where 
the constraint name is followed either by `ConstraintCharacteristics` (`[NOT] 
DEFERRABLE`, `INITIALLY ...`, `[NOT] ENFORCED`) or by `[NO] INHERIT`.
   
   PostgreSQL 18's grammar also takes `NO INHERIT` mixed with the others, but 
it rejects that mix on every constraint kind right after parsing, so I kept the 
two forms apart.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [PR] PostgreSQL: Support `ALTER ... LucaCappelletti94 (via GitHub) via github

Reply via email to