Skip to content

Commit 7aaa839

Browse files
committed
More comprehensive tests
1 parent d2598da commit 7aaa839

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/sqlparser_postgres.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,13 @@ fn parse_create_table_with_defaults() {
513513
}
514514

515515
#[test]
516-
fn parse_default_expr_parenthesized_then_cast() {
517-
// Infix operators like :: after parenthesized expression in DEFAULT
516+
fn parse_infix_after_parenthesized_column_option() {
517+
// Cast
518518
pg().verified_stmt("CREATE TABLE t (c TEXT DEFAULT (foo())::TEXT)");
519+
// Chained casts
520+
pg().verified_stmt("CREATE TABLE t (c TEXT DEFAULT (foo())::INT::TEXT)");
521+
// Other infix operators
522+
pg().verified_stmt("CREATE TABLE t (c INT DEFAULT (foo()) + 1)");
519523
}
520524

521525
#[test]

0 commit comments

Comments
 (0)