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

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: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers

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.


Attachment: pgadmin_003.diff
Description: text/plain (700 bytes)

pgadmin-hackers by date

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

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