diff --git a/src/parser/mod.rs b/src/parser/mod.rs index a7190563f..674d0692b 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -5954,7 +5954,8 @@ impl<'a> Parser<'a> { pub fn parse_function_definition(&mut self) -> Result { let peek_token = self.peek_token(); match peek_token.token { - Token::DollarQuotedString(value) if dialect_of!(self is PostgreSqlDialect) => { + Token::DollarQuotedString(value) if dialect_of!(self is PostgreSqlDialect | GenericDialect) => + { self.next_token(); Ok(FunctionDefinition::DoubleDollarDef(value.value)) } diff --git a/tests/sqlparser_postgres.rs b/tests/sqlparser_postgres.rs index 9de4b981f..4a92cd45c 100644 --- a/tests/sqlparser_postgres.rs +++ b/tests/sqlparser_postgres.rs @@ -3305,7 +3305,7 @@ fn parse_create_function() { let sql = "CREATE OR REPLACE FUNCTION add(a INTEGER, IN b INTEGER = 1) RETURNS INTEGER LANGUAGE SQL IMMUTABLE RETURN a + b"; assert_eq!( - pg().verified_stmt(sql), + pg_and_generic().verified_stmt(sql), Statement::CreateFunction { or_replace: true, temporary: false,