Skip to content

Commit 65a9d7b

Browse files
Extended test coverage
1 parent 2a6609b commit 65a9d7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/sqlparser_postgres.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5578,6 +5578,13 @@ fn parse_create_unlogged_table() {
55785578
}
55795579
_ => unreachable!(),
55805580
}
5581+
5582+
// Negative test: UNLOGGED without TABLE should error
5583+
let res = pg().parse_sql_statements("CREATE UNLOGGED VIEW v AS SELECT 1");
5584+
assert!(
5585+
res.is_err(),
5586+
"CREATE UNLOGGED should only be followed by TABLE"
5587+
);
55815588
}
55825589

55835590
#[test]

0 commit comments

Comments
 (0)