X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id CAB10D1B55E for ; Wed, 8 Oct 2003 22:31:33 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 63558-07 for ; Wed, 8 Oct 2003 19:30:49 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 1CA2DD1B4E5 for ; Wed, 8 Oct 2003 19:30:46 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h98MUIf08911; Wed, 8 Oct 2003 18:30:18 -0400 (EDT) From: Bruce Momjian Message-Id: <200310082230.h98MUIf08911@candle.pha.pa.us> Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta) In-Reply-To: <3F79CE69.3040203@Yahoo.com> To: Jan Wieck Date: Wed, 8 Oct 2003 18:30:18 -0400 (EDT) Cc: Stephan Szabo , Tom Lane , Christopher Kings-Lynne , Peter Childs , PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/445 X-Sequence-Number: 45127 Jan Wieck wrote: > > I think this is a larger argument than the one that was being discussed > > above. Given a dump of objects I own, can I restore them without requiring > > the fk check to be done if I alter table add constraint a foreign key? If > > the answer to that is no, then the option can be put in as a superuser > > only option and it's relatively easy. If the answer to that is yes, then > > there are additional issues that need to be resolved. > > Well, with the CREATE CONSTRAINT TRIGGER you _can_, but we already have > a consensus that we don't _want_ that. Probably we should declare it > deprecated and remove it in 7.5. And the option currently under > discussion is exactly what will cause ALTER TABLE to let you, but IMHO > that _should_ be restricted. Added to TODO: * Remove CREATE CONSTRAINT TRIGGER -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073