Skip site navigation (1) Skip section navigation (2)

Re: ALTER TABLE ... IF EXISTS feature?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Farina <drfarina(at)acm(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE ... IF EXISTS feature?
Date: 2010-11-05 18:04:15
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
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

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-11-05 18:13:47
Subject: Re: [PATCH] Revert default wal_sync_method to fdatasync on Linux 2.6.33+
Previous:From: Daniel FarinaDate: 2010-11-05 17:36:38
Subject: Re: ALTER TABLE ... IF EXISTS feature?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group