nene / prettier-plugin-sql-cst

Prettier SQL plugin that uses sql-parser-cst
https://nene.github.io/prettier-sql-playground/
GNU General Public License v3.0
123 stars 7 forks source link

Invalid type for postgres enum #29

Closed Sicria closed 2 months ago

Sicria commented 2 months ago

Using the following snippet in the playground causes an error.

I know it's mentioned as experimental but it would be great if additional support was added or if there was a way to disable certain blocks/lines.

https://nene.github.io/prettier-sql-playground/

create type public.preference_type as ENUM (
  'table_columns_list',
  'table_columns_page'
);
nene commented 2 months ago

Yes, Postgres support is far from complete. But thanks for reporting, this helps me to prioritize these missing features that people actually use the most.

You can follow the progress of implementing Postgres parser in sql-parser-cst repository. There's also a separate task for the CREATE TYPE syntax support.

I'll close this issue here, as the problem is on the parser side, not in the prettier plugin.