Daniel Farina <drfarina(at)acm(dot)org> writes:
> I am somewhat sympathetic to this argument, except for one thing:
> pg_dump --clean will successfully and silently wipe out a foreign key
> right now, should it exist,
No, it will not, because we don't use CASCADE in the drop commands.
The case I'm thinking about is where we are trying to --clean the PK
table, and the referencing table is one we don't know about. The other
way around, the FK constraint will disappear, but that's arguably less
problematic.
regards, tom lane