Implement CREATE TABLE IF NOT EXISTS (#163)

A non-standard feature supported at least by Postgres

https://www.postgresql.org/docs/12/sql-createtable.html
This commit is contained in:
Alex Dukhno 2020-04-21 16:28:02 +03:00 committed by GitHub
parent 06865113d7
commit 5ad578e3e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 1 deletions

View file

@ -909,6 +909,7 @@ fn parse_create_table() {
columns,
constraints,
with_options,
if_not_exists: false,
external: false,
file_format: None,
location: None,
@ -1045,6 +1046,7 @@ fn parse_create_external_table() {
columns,
constraints,
with_options,
if_not_exists,
external,
file_format,
location,
@ -1086,6 +1088,7 @@ fn parse_create_external_table() {
assert_eq!("/tmp/example.csv", location.unwrap());
assert_eq!(with_options, vec![]);
assert!(!if_not_exists);
}
_ => unreachable!(),
}