sabir-akhadov-localstack commented on code in PR #2728:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2728#discussion_r4394080698


##########
src/parser/mod.rs:
##########
@@ -6141,6 +6141,17 @@ impl<'a> Parser<'a> {
             } else if self.parse_keyword(Keyword::RETURN) {
                 ensure_not_set(&body.function_body, "RETURN")?;
                 body.function_body = 
Some(CreateFunctionBody::Return(self.parse_expr()?));
+            } else if self.peek_keywords(&[Keyword::BEGIN, Keyword::ATOMIC]) {

Review Comment:
   PostgreSQL accepts the same body for procedures (`CREATE PROCEDURE p() 
LANGUAGE sql BEGIN ATOMIC INSERT INTO t VALUES (1); END`), which 
`parse_create_procedure` still rejects at `AS`. Fine as a follow-up.



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