Re: Foreign keys for non-default datatypes, redux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Foreign keys for non-default datatypes, redux
Date: 2007-02-10 22:20:11
Message-ID: 27406.1171146011@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-10 22:25:43 Re: XML export
Previous Message Joshua D. Drake 2007-02-10 22:09:53 Re: Foreign keys for non-default datatypes, redux