LucaCappelletti94 commented on code in PR #2773:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2773#discussion_r4428550376


##########
tests/sqlparser_postgres.rs:
##########
@@ -11488,10 +11488,83 @@ fn 
display_create_function_begin_atomic_propagates_write_errors() {
         }
     }
 
-    let stmt = pg_and_generic()
-        .verified_stmt("CREATE FUNCTION f() RETURNS INT LANGUAGE sql BEGIN 
ATOMIC SELECT 1; END");
-    for rejected in [" BEGIN ATOMIC", " ", ";", " END"] {
-        let mut writer = RejectingWriter(rejected);
-        assert_eq!(write!(writer, "{stmt}"), Err(fmt::Error), "{rejected:?}");
+    for sql in [
+        "CREATE FUNCTION f() RETURNS INT LANGUAGE sql BEGIN ATOMIC SELECT 1; 
END",
+        "CREATE PROCEDURE p () LANGUAGE sql BEGIN ATOMIC SELECT 1; END",
+    ] {
+        let stmt = pg_and_generic().verified_stmt(sql);
+        for rejected in [" BEGIN ATOMIC", " ", ";", " END"] {
+            let mut writer = RejectingWriter(rejected);
+            assert_eq!(
+                write!(writer, "{stmt}"),
+                Err(fmt::Error),
+                "{sql}: {rejected:?}"
+            );
+        }
+    }
+}
+
+#[test]
+fn parse_create_procedure_begin_atomic() {

Review Comment:
   Done!



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