iffyio commented on code in PR #1485:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1485#discussion_r1824163255


##########
src/parser/mod.rs:
##########
@@ -532,6 +532,14 @@ impl<'a> Parser<'a> {
                 Keyword::EXECUTE => self.parse_execute(),
                 Keyword::PREPARE => self.parse_prepare(),
                 Keyword::MERGE => self.parse_merge(),
+                // `LISTEN` and `NOTIFY` are Postgres-specific
+                // syntaxes. They are used for Postgres statement.
+                Keyword::LISTEN if dialect_of!(self is PostgreSqlDialect | 
GenericDialect) => {
+                    self.parse_listen()
+                }
+                Keyword::NOTIFY if dialect_of!(self is PostgreSqlDialect | 
GenericDialect) => {
+                    self.parse_notify()
+                }

Review Comment:
   Can we use a dialect method `dialect.supports_listen_notify()` to guard the 
behavior?



##########
tests/sqlparser_postgres.rs:
##########
@@ -5157,3 +5157,34 @@ fn parse_create_type_as_enum() {
         _ => unreachable!(),
     }
 }
+
+#[test]

Review Comment:
   The tests we can move over to common as part of switching over from the 
dialect_of macro to a dialect method 



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