Hi list,
Quite recently I stumbled upon this bug in pgAdminIII and today I was
reading Guillaume Lelarge's article about pgAdmin's git repository and
this is the result. :)
The patch is attached, or you can also get it at
http://github.com/intgr/pgadmin3 branch "mybugfix"
Regards,
Marti
----
Commit message:
Fix CREATE INDEX/CONSTRAINT syntax when tablespace and fillfactor are specified
Reverse the order of TABLESPACE and WITH() clauses for indexes. Previously
pgAdminIII generated CREATE scripts like:
ALTER TABLE foo ADD CONSTRAINT foo_pkey PRIMARY KEY(foo_id)
USING INDEX TABLESPACE bar WITH (FILLFACTOR=50);
CREATE INDEX foo_foo_id ON foo USING btree (foo_id)
TABLESPACE bar WITH (FILLFACTOR=50);
However these are illegal PostgreSQL syntax, the WITH() clause must come before
TABLESPACE.
The statements generated by "new index" or "new primary key" dialogs are
already correct.