Duplicated foreign key constraints

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Duplicated foreign key constraints
Дата
Msg-id 64468.216.238.112.88.1046184709.squirrel@$HOSTNAME
обсуждение исходный текст
Список pgsql-general
I don't really know how I did this, but I managed somehow to end up with
every foreign key constraint in my database duplicated. It probably
happened somehow in the process of pg_dump/restore when I made some kind
of mistake and accidentally imported part of the schema definition twice,
but how my database got this way is less important to me right now than
answering how can I clean-up the mess, i.e., how can I drop the second
copy of each foreign key constraint?

pgAdminII doesn't let me drop foreign key constraints. And looking the
system tables is complicated because what I define as a "constraint"
shows up as three rows in pg_catalog.pg_trigger (so I have six triggers
per table--two of each "on insert", "on delete", and "on update"), and it
is not obvious from looking at that table which row corresponds to which
trigger.

Got any suggestions?

~Berend Tober




В списке pgsql-general по дате отправления:

Предыдущее
От: Ericson Smith
Дата:
Сообщение: Re: 7.4?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: 7.4?