test: add additional tests for create table statement

This commit is contained in:
Dmitriy Pleshevskiy 2023-01-06 23:59:35 +03:00
parent ccc76f983a
commit f7722271eb
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
1 changed files with 74 additions and 0 deletions

View File

@ -36,3 +36,77 @@ create table public.foo ();
)
)
)
================================================================================
Create an empty temporary table
================================================================================
create temporary table foo ();
create temp table foo ();
--------------------------------------------------------------------------------
(source_file
(statement
(create_table
(keyword_create)
(keyword_temporary)
(keyword_table)
(table_reference
name: (identifier)
)
(column_definitions)
)
)
(statement
(create_table
(keyword_create)
(keyword_temporary)
(keyword_table)
(table_reference
name: (identifier)
)
(column_definitions)
)
)
)
================================================================================
Create an empty unlogged table
================================================================================
create unlogged table foo ();
--------------------------------------------------------------------------------
(source_file
(statement
(create_table
(keyword_create)
(keyword_unlogged)
(keyword_table)
(table_reference
name: (identifier)
)
(column_definitions)
)
)
)
================================================================================
Create an empty table if not exists
================================================================================
create table if not exists foo ();
--------------------------------------------------------------------------------
(source_file
(statement
(create_table
(keyword_create)
(keyword_table)
(keyword_if)
(keyword_not)
(keyword_exists)
(table_reference
name: (identifier)
)
(column_definitions)
)
)
)