wrong order of drop constraint/column statements

From: Miha Radej <miha(dot)radej(at)siix(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: wrong order of drop constraint/column statements
Date: 2005-11-25 13:31:39
Message-ID: 4387123B.604@siix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

hi!

with pgadmin built from a fresh svn checkout i have experienced the
following problem, easily reproducible as follows:

i am working on an existing table with some columns and constraints
placed on them. in the table properties window, columns tab i removed a
column and in the constraints tab i removed the constraint placed on
that column. pgadmin produced an incorrect statement order, which was

drop column...
drop constraint...

which resulted in an error saying that the constraint specified does not
exist (as it got removed along with the column). the statement order
should be switched so that the constraint drops are executed before
column drops.

attached is a patch that works for me (pushes the drop constraint
statements before any other statements generated so far) but i do not
know if it will break something else somewhere or if there are such
things as constraints that depend on other constraints and should
therefore be removed in the correct order.

cheers,
M

Attachment Content-Type Size
pgadmin_003.diff text/plain 700 bytes

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2005-11-27 15:56:56 SVN Commit by andreas: r4763 - trunk/pgadmin3/docs/en_US
Previous Message svn 2005-11-25 11:42:01 SVN Commit by dpage: r4762 - branches/REL-1_4_0_PATCHES/pgadmin3