Closed noahbowman closed 5 years ago
Thank you for report.
I checked with these SQL.
CREATE TABLE Sample_Table_1 (
Col_01 varchar(100),
Col_02 char(200),
Col_03 integer,
Col_04 double,
Col_05 datetime,
CONSTRAINT const_01 PRIMARY KEY (Col_01)
);
CREATE TABLE Sample_Table_2 (
Col_01 varchar(100),
Col_02 char(200),
Col_03 integer,
Col_04 double,
Col_05 datetime,
CONSTRAINT const_01 PRIMARY KEY (Col_01, Col_02)
);
But I did not find the problem. Please give me the SQL to reproduce.
Hello,
Seems I have been mistaken. For reference, I was using the postgresql sytax like below. However, it must have been a result of my own code that the pk constraints were not being parsed, as I tried again with a fresh clone and the issue is no longer. Sorry for the false alarm!
CREATE TABLE Sample_Table_2 (
Col_01 varchar(100),
Col_02 char(20 0),
Col_03 integer,
Col_04 double,
Col_05 datetime,
PRIMARY KEY (Col_01, Col_02)
);
edit: code insert
It seems to me that with the use of 'delimitedList', the primary key should allow multiple columns.
However, when provided with a line such as:
primary key (column1, column2, column3)
, pyparsing raises the following exception:When provided a table with a primary key constraint on only one column (
primary key (column1)
), ddlparse handles this with no problem.