mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-29 10:24:06 +00:00
Support IF NOT EXISTS for CREATE SCHEMA (#276)
This is a Postgres-specific clause: https://www.postgresql.org/docs/12/sql-createschema.html Also add a test for `DROP SCHEMA IF EXISTS schema_name`, which is already supported in the parser.
This commit is contained in:
parent
926b03a31d
commit
1ac208307c
4 changed files with 46 additions and 4 deletions
|
@ -1204,7 +1204,7 @@ fn parse_create_schema() {
|
|||
let sql = "CREATE SCHEMA X";
|
||||
|
||||
match verified_stmt(sql) {
|
||||
Statement::CreateSchema { schema_name } => {
|
||||
Statement::CreateSchema { schema_name, .. } => {
|
||||
assert_eq!(schema_name.to_string(), "X".to_owned())
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue