zhm / node-pg-query-native

PostgreSQL Query Parser for Node.js
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

This postgresql query throws error: Error: syntax error at or near "AS" #8

Open Kreijstal opened 6 years ago

Kreijstal commented 6 years ago

This is the query:

CREATE SEQUENCE public.user_permissions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;

This was generated from pg_dump, so there must be a bug with the library.

lfittl commented 6 years ago

This is likely since this library wasn't updated yet for Postgres 10 - @zhm should be able to comment on how complex of an effort that would be.

It essentially requires an update of the underlying libpg_query library to 10-1.0.0 or newer (see https://github.com/lfittl/libpg_query/blob/10-latest/CHANGELOG.md#10-100---2017-10-30)

Kreijstal commented 6 years ago

this project hasn't been updated in years, tho :cry: