Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres Array type doesn't work #58

Closed
vgiverts opened this issue Jun 17, 2020 · 2 comments
Closed

Postgres Array type doesn't work #58

vgiverts opened this issue Jun 17, 2020 · 2 comments

Comments

@vgiverts
Copy link

My schema uses Postgres Arrays and I was getting an error when attempting a dry run. The test case schema is simply:

CREATE TABLE public.users ( id integer NOT NULL, arr ARRAY )

The export works fine
/psqldef test --export > schema.sql

But the --dry-run fails
/psqldef test --dry-run < schema.sql

I get:
syntax error at position 67 near 'ARRAY'

@k0kubun
Copy link
Collaborator

k0kubun commented Jun 17, 2020

Thanks for reporting. Let me confirm this first: You intended to use something like arr integer ARRAY, right?

@k0kubun
Copy link
Collaborator

k0kubun commented Jun 19, 2020

Your exact test case didn't work on my Postgres:

test=# CREATE TABLE public.users ( id integer NOT NULL, arr ARRAY );
ERROR:  syntax error at or near "ARRAY"
LINE 1: ...REATE TABLE public.users ( id integer NOT NULL, arr ARRAY );
                                                               ^

But I fixed the issue for types like integer array, integer[], etc. Please try v0.5.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants