Skip site navigation (1) Skip section navigation (2)

[PATCH] Fix CREATE INDEX/CONSTRAINT syntax when tablespace and fillfactor are specified

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: pgAdmin hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix CREATE INDEX/CONSTRAINT syntax when tablespace and fillfactor are specified
Date: 2010-10-05 21:33:57
Message-ID: AANLkTikvq9Y5RTbJKXOmUnyw-_+z2wJoXdZY8531XyVN@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
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.

Attachment: 0001-Fix-CREATE-INDEX-CONSTRAINT-syntax-when-tablespace-a.patch
Description: text/x-patch (2.7 KB)

Responses

pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2010-10-05 22:25:59
Subject: Re: [PATCH] Fix CREATE INDEX/CONSTRAINT syntax when tablespace and fillfactor are specified
Previous:From: Dave PageDate: 2010-10-04 12:54:45
Subject: Re: pgAdmin 1.12.1 tarball available

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group