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

   `CREATE EXTENSION hstore SCHEMA exts` failed to parse under 
`PostgreSqlDialect` with `Expected: end of statement, found: SCHEMA`, and so 
did options written out of order, such as `CREATE EXTENSION pgcrypto WITH 
VERSION '1.3' SCHEMA exts`. PostgreSQL makes `WITH` optional and takes 
`SCHEMA`, `VERSION` and `CASCADE` in any order 
(https://www.postgresql.org/docs/current/sql-createextension.html). PostgreSQL 
18 accepts both statements and rejects an option given twice with `conflicting 
or redundant options`.
   
   Some of these valid syntaxes look rather odd, but I did verify that each 
works.
   
   `parse_create_extension` now reads an optional `WITH` and then the options 
in any order, rejecting a repeated one. `CreateExtension` gains a 
`with_keyword` field so both spellings round-trip. The options stay in the 
existing `schema`, `version` and `cascade` fields, so `Display` writes them in 
that order.


-- 
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]

Reply via email to