[pgadmin3] [postgresSQL] [bug] Two or more different types of constraints with same name creates ambiguity while drooping.

From: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgadmin3] [postgresSQL] [bug] Two or more different types of constraints with same name creates ambiguity while drooping.
Date: 2016-03-29 18:26:52
Message-ID: CAFiP3vyvx87o9V-WA1QEMoow-oe2aHTHKYvWfp+eaa+Nst+RzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

If we create two different type of constrains (lets say primary key and
foreign key) with same name (lets say 'key' ) then its shows same drop
query for both constrains.
e.g.

ALTER TABLE public."Test_tbl" DROP CONSTRAINT key;

If we execute above query for first time then it drops primary key first
and if execute same query for second time then it drops foreign key.

Also in pgadmin3 if we right click on foreign key and try to drop it, it
drops primary key and not the foreign key. We have to drop foreign key
twice to actually drop the foreign key if primary key with same was there.

*Note: Create foreign key first with some name and then primary key with
same name.*

--
*Harshal Dhumal*
*Software Engineer *

EenterpriseDB <http://www.enterprisedb.com>

Browse pgadmin-hackers by date

  From Date Subject
Next Message Roman Krasavtsev 2016-03-29 20:40:20 Close connection button
Previous Message Akshay Joshi 2016-03-29 14:39:08 [pgAdmin4][Patch] Add formatted error message support in psycopg2