Parse INSERT with subquery when lacking column names (#1586)

This commit is contained in:
Ifeanyi Ubah 2024-12-11 23:31:24 +01:00 committed by GitHub
parent 00abaf2187
commit 04271b0e4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 6 deletions

View file

@ -10964,6 +10964,8 @@ fn insert_into_with_parentheses() {
Box::new(GenericDialect {}),
]);
dialects.verified_stmt("INSERT INTO t1 (id, name) (SELECT t2.id, t2.name FROM t2)");
dialects.verified_stmt("INSERT INTO t1 (SELECT t2.id, t2.name FROM t2)");
dialects.verified_stmt(r#"INSERT INTO t1 ("select", name) (SELECT t2.name FROM t2)"#);
}
#[test]