Re: ALTER TABLE ... IF EXISTS feature? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER TABLE ... IF EXISTS feature?
Date
Msg-id 27481.1288980255@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE ... IF EXISTS feature?  (Daniel Farina <drfarina@acm.org>)
Responses Re: ALTER TABLE ... IF EXISTS feature?
List pgsql-hackers
Daniel Farina <drfarina@acm.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


pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: ALTER TABLE ... IF EXISTS feature?
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+