At 13:29 7/01/01 -0500, Tom Lane wrote:
>The Hermit Hacker <scrappy@hub.org> writes:
>> Essentially, worst case scenario, we are going from 'broken->broken' ...
>
>No, I don't think so. The current pg_dump code is only broken if
>you've renamed a column involved in a foreign-key dependency (if I
>understood the thread correctly). But Philip is proposing to change
>pg_dump to rely on alter table add constraint for *all* PRIMARY KEY
>constructs.
I've got a version of this working now, but it raises a further question:
should I also put the CHECK constraints into ALTER TABLE statements?
Eventually they should go there, but maybe not for 7.1 given the concerns
over ALTER TABLE ADD CONSTRAINT.
Reasons for:
- It's nicer
- It's more consistent with PK
- Can use pg_restore to restore tables without constraints
Reasons against:
- ALTER TABLE ADD CONSTRAINT is untested
- We're in beta, and the code ain't broke
I suspect the last point says it all...
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/