pgAdmin III commit: Fix CREATE INDEX/CONSTRAINT syntax when tablespace

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin III commit: Fix CREATE INDEX/CONSTRAINT syntax when tablespace
Date: 2010-10-06 19:14:38
Message-ID: 201010061914.o96JEcZl084144@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=79835bfa6b57b4a3b64ba1377f79f51cf35ec2f2
Author: Marti Raudsepp <marti(at)juffo(dot)org>

Modified Files
--------------
pgadmin/schema/pgIndex.cpp | 6 +++---
pgadmin/schema/pgIndexConstraint.cpp | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2010-10-06 19:18:39 Re: [PATCH] Fix CREATE INDEX/CONSTRAINT syntax when tablespace and fillfactor are specified
Previous Message Guillaume Lelarge 2010-10-06 18:10:49 pgAdmin website commit: Automatic stringmerge using merge script.