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