Skip to content

Commit 6a09ed0

Browse files
tests(postgres): use verified_stmt for COPY FROM STDIN variants
1 parent c7bc318 commit 6a09ed0

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

tests/sqlparser_postgres.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,24 +1105,25 @@ fn parse_copy_from_stdin_without_semicolon() {
11051105

11061106
#[test]
11071107
fn parse_copy_from_stdin_without_semicolon_variants() {
1108+
// This covers additional COPY ... FROM STDIN shapes without inline payload.
1109+
// `parse_copy_from_stdin_without_semicolon` asserts the legacy NULL option details.
11081110
let cases = [
1109-
"COPY bool_test FROM STDIN NULL 'null'",
1110-
"COPY varbit_table FROM stdin",
1111-
"COPY bit_table FROM stdin",
1112-
"copy copytest2(test) from stdin",
1113-
"copy copytest3 from stdin csv header",
1114-
"copy copytest4 from stdin (header)",
1115-
"copy parted_copytest from stdin",
1116-
"copy tab_progress_reporting from stdin",
1117-
"copy oversized_column_default from stdin",
1118-
"COPY x (a, b, c, d, e) from stdin",
1119-
"copy header_copytest (c, a) from stdin",
1120-
"COPY atest5 (two) FROM stdin",
1121-
"COPY main_table (a, b) FROM stdin",
1111+
"COPY varbit_table FROM STDIN",
1112+
"COPY bit_table FROM STDIN",
1113+
"COPY copytest2 (test) FROM STDIN",
1114+
"COPY copytest3 FROM STDIN CSV HEADER",
1115+
"COPY copytest4 FROM STDIN (HEADER)",
1116+
"COPY parted_copytest FROM STDIN",
1117+
"COPY tab_progress_reporting FROM STDIN",
1118+
"COPY oversized_column_default FROM STDIN",
1119+
"COPY x (a, b, c, d, e) FROM STDIN",
1120+
"COPY header_copytest (c, a) FROM STDIN",
1121+
"COPY atest5 (two) FROM STDIN",
1122+
"COPY main_table (a, b) FROM STDIN",
11221123
];
11231124

11241125
for sql in cases {
1125-
match pg().one_statement_parses_to(sql, "") {
1126+
match pg().verified_stmt(sql) {
11261127
Statement::Copy {
11271128
to: false,
11281129
target: CopyTarget::Stdin,

0 commit comments

Comments
 (0)