simple-ddl-parser
simple-ddl-parser copied to clipboard
Partitions are not handled
Describe the bug Partition definition is not handled by the parser, 'parse_from_file' Returns an empty list
To Reproduce Steps to reproduce the behavior:
Add this code to a simple create table query:
PARTITION BY col(id) ( PARTITION a VALUES('12') WITH (appendonly='false'), PARTITION b VALUES('9') WITH (appendonly='false') );
Expected behavior Return an non empty result or If there is a problem with partition,skip partition result instead of giving no result at all.
@sr1dar hi, sorry for the delay, can you write in what DB this syntax is used? or better send the link to the doc :)
@xnuinside Hello, This syntax is used in Green Plum Database (GPDB) Here is the link: https://gpdb.docs.pivotal.io/5290/admin_guide/ddl/ddl-partition.html
Also the same problem exists when there is a check constraint along with a primary key constraint, CONSTRAINT new_check CHECK ((id = (3)::numeric))
and when INHERIT is present in the DDL: INHERITS(schemaname.tablename)
Both are GPDB syntaxes, Should I create a new issue for this? (Sorry I'm new to github)
@sr1dar sorry, I forgot to answer, I need time to add new dialect