Re: Foreign keys for non-default datatypes, redux - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Foreign keys for non-default datatypes, redux
Date
Msg-id 27406.1171146011@sss.pgh.pa.us
Whole thread Raw
In response to Re: Foreign keys for non-default datatypes, redux  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
>> key constraints loaded from dumps from pre-7.3 databases will no longer
>> work.  Those dumps just contain "CREATE CONSTRAINT TRIGGER" commands
>> which will not provide enough information.  We can make the triggers
>> throw errors suggesting that the user drop the triggers and perform
>> ALTER TABLE ADD CONSTRAINT.  Is that enough, or do we need to try
>> harder?

> Further in their right mind is trying to do a 24x7 shop on 7.3. They
> could always dump to 8.1 and then to 8.3.

Actually that wouldn't help: you'd still have a CREATE CONSTRAINT TRIGGER
-based foreign key.  The only thing that'd really fix it is having used
the old contrib "adddepend" utility at some point along the line.  Since
we never forced people to do that, it's fairly likely that some never
did.

[Thinks for a bit...]  It would still work to run adddepend over the
schema even after having loaded it into 8.3, assuming that adddepend
hasn't suffered bit-rot.  We dropped it from contrib because no one
was maintaining it anymore, but AFAIR there was no evidence that it's
actively broken.  So maybe we can just point to that for anyone who
comes along with an upgrade problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Foreign keys for non-default datatypes, redux
Next
From: Peter Eisentraut
Date:
Subject: Re: XML export