node-pg-query-native icon indicating copy to clipboard operation
node-pg-query-native copied to clipboard

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

Open Kreijstal opened this issue 7 years ago • 2 comments

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.

Kreijstal avatar Jul 31 '18 13:07 Kreijstal

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)

lfittl avatar Jul 31 '18 14:07 lfittl

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

Kreijstal avatar Jul 31 '18 15:07 Kreijstal