Re: Legacy foreign keys - Mailing list pgsql-admin

From Peter Koczan
Subject Re: Legacy foreign keys
Date
Msg-id 4544e0330802021143n2d38dce8k4ff9ab271aa35c2a@mail.gmail.com
Whole thread Raw
In response to Re: Legacy foreign keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Legacy foreign keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
> Yeah, it's expecting to see a set of three related triggers.  For
> instance, if I do this in a 7.0 database:
> ...
> If your original database doesn't have all three triggers, then you had
> a problem already --- the FK constraint wasn't being enforced properly.

Ah, these were from before I became the main database admin. It was
probably some previous admin or programmer who thought he could be
clever and drop the other FK-related triggers.

> In 8.3, you could look for the pg_trigger entries with zero tgconstraint
> values.  However, prior versions don't have that column; you'd have to
> look instead for entries that aren't linked to a pg_constraint entry
> by a pg_depend entry.

Thanks again, I should have enough info to fix this now.

Peter

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Legacy foreign keys
Next
From: Tom Lane
Date:
Subject: Re: Legacy foreign keys