feat: Support TABLE keyword with SELECT INTO (#487)

This commit is contained in:
Alex Qyoun-ae 2022-05-09 22:29:43 +04:00 committed by GitHub
parent 6d057ef4df
commit 6b2fc8102f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View file

@ -383,13 +383,17 @@ fn parse_select_into() {
&SelectInto {
temporary: false,
unlogged: false,
table: false,
name: ObjectName(vec![Ident::new("table0")])
},
only(&select.into)
);
let sql = "SELECT * INTO TEMPORARY UNLOGGED table0 FROM table1";
one_statement_parses_to(sql, "SELECT * INTO TEMPORARY UNLOGGED table0 FROM table1");
let sql = "SELECT * INTO TEMPORARY UNLOGGED TABLE table0 FROM table1";
one_statement_parses_to(
sql,
"SELECT * INTO TEMPORARY UNLOGGED TABLE table0 FROM table1",
);
// Do not allow aliases here
let sql = "SELECT * INTO table0 asdf FROM table1";