sqlparse icon indicating copy to clipboard operation
sqlparse copied to clipboard

Several issues with DDL parsing - most annoying is table name identified as a function

Open rvatne opened this issue 3 years ago • 2 comments

'create table A(....' will identify A as a function 'CREATE table A(....' will not - aka is OK 'create table "A"(....' is also OK

varchar2 (2) will identify varchar2 as Token.Name.Builtin while varchar2(2) will identify varchar2 as Token.Name

I know the original intention with this library probably was not parsing DDL's, but I bet there is more persons trying to parse DDL's than SQL (queries)

rvatne avatar Feb 18 '21 15:02 rvatne

@rvatne if it is a still actual for you - I created separate library for DDL parsing because of several issues in sqlparse https://github.com/xnuinside/simple-ddl-parser

xnuinside avatar Mar 19 '21 08:03 xnuinside

I got bitten by this today. I had to capitalize both "create" and "table". It's really surprising to me that parsing is so affected by case.

jimfulton avatar Mar 30 '21 14:03 jimfulton