taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
798 stars 180 forks source link

Support CREATE statements for composite types in postgres #1984

Closed 1ilit closed 2 months ago

1ilit commented 3 months ago

It would be really helpful if there was support for parsing CREATE TYPE statements not only for enums but also for composite types

Database Engine PostgreSQL

To Reproduce -the SQL that be parsed

CREATE TYPE address AS (
    street VARCHAR(255),
    city VARCHAR(100),
    state VARCHAR(100),
    zip_code VARCHAR(10)
);

-the node-sql-parser version v5.2.0 -the node version v18.20.3

Expected behavior Produce ast