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

   Dialects: PostgreSQL, Generic
   
   `CREATE OR REPLACE PROCEDURE p () LANGUAGE sql BEGIN ATOMIC SELECT 1; END` 
failed with `Expected: [EXTERNAL] TABLE or [MATERIALIZED] VIEW or FUNCTION or 
AGGREGATE or SCHEMA or WAREHOUSE after CREATE OR REPLACE, found: PROCEDURE`. 
The PostgreSQL synopsis is `CREATE [ OR REPLACE ] PROCEDURE`: 
https://www.postgresql.org/docs/current/sql-createprocedure.html
   
   `parse_create` now reaches `parse_create_procedure` before that error, and 
`Statement::CreateProcedure` gains `or_replace`. A modifier next to `OR 
REPLACE`, such as `OR ALTER` or `TEMPORARY`, stays an error. 
`parse_create_procedure` takes `or_replace` as a new argument.
   
   `OR REPLACE` with a string body needs #2841.
   
   Written with an AI coding assistant.
   


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