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.
ALTERTABLEpublic."Test_tbl"DROPCONSTRAINTkey;
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.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера