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

Syntax error in 7-INDEX.sql (1.0 beta 1 for linux) #36

Open
m3dbedb opened this issue Jun 8, 2018 · 0 comments
Open

Syntax error in 7-INDEX.sql (1.0 beta 1 for linux) #36

m3dbedb opened this issue Jun 8, 2018 · 0 comments

Comments

@m3dbedb
Copy link

m3dbedb commented Jun 8, 2018

This is 7-INDEX.sql generated by pgdiff

CREATE UNIQUE INDEX books_lost_id_pkey ON books_lost USING btree (id)
ALTER TABLE public.books_lost ADD CONSTRAINT books_lost_id_pkey PRIMARY KEY USING INDEX books_lost_id_pkey; 

It fails to run with error

ERROR:  syntax error (approximate position: "ALTER")
STRING 2: ALTER TABLE public.books_lost ADD CONSTRAINT books_lost_id_p...
          ^

And it gone after adding a semicolon to the first string:

CREATE UNIQUE INDEX books_lost_id_pkey ON books_lost USING btree (id);
ALTER TABLE public.books_lost ADD CONSTRAINT books_lost_id_pkey PRIMARY KEY USING INDEX books_lost_id_pkey;
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

1 participant