Skip to content

Commit 7ba1252

Browse files
authored
Revert "Fix DDL generation in case of an empty arguments function. (apache#1690)"
This reverts commit 6f29ca2.
1 parent 188b718 commit 7ba1252

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/ast/ddl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,8 +2011,6 @@ impl fmt::Display for CreateFunction {
20112011
)?;
20122012
if let Some(args) = &self.args {
20132013
write!(f, "({})", display_comma_separated(args))?;
2014-
} else {
2015-
write!(f, "()")?;
20162014
}
20172015
if let Some(return_type) = &self.return_type {
20182016
write!(f, " RETURNS {return_type}")?;

tests/sqlparser_postgres.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3802,7 +3802,6 @@ fn parse_create_function_detailed() {
38023802
pg_and_generic().verified_stmt("CREATE OR REPLACE FUNCTION add(a INTEGER, IN b INTEGER = 1) RETURNS INTEGER LANGUAGE SQL STABLE PARALLEL UNSAFE RETURN a + b");
38033803
pg_and_generic().verified_stmt("CREATE OR REPLACE FUNCTION add(a INTEGER, IN b INTEGER = 1) RETURNS INTEGER LANGUAGE SQL STABLE CALLED ON NULL INPUT PARALLEL UNSAFE RETURN a + b");
38043804
pg_and_generic().verified_stmt(r#"CREATE OR REPLACE FUNCTION increment(i INTEGER) RETURNS INTEGER LANGUAGE plpgsql AS $$ BEGIN RETURN i + 1; END; $$"#);
3805-
pg_and_generic().verified_stmt(r#"CREATE OR REPLACE FUNCTION no_arg() RETURNS VOID LANGUAGE plpgsql AS $$ BEGIN DELETE FROM my_table; END; $$"#);
38063805
}
38073806
#[test]
38083807
fn parse_incorrect_create_function_parallel() {

0 commit comments

Comments
 (0)