Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1BE9B2E2E6F for ; Mon, 10 Dec 2007 18:11:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 98916-05 for ; Mon, 10 Dec 2007 18:11:00 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 657B52E010E for ; Mon, 10 Dec 2007 18:08:17 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBAM8DKh020428; Mon, 10 Dec 2007 17:08:13 -0500 (EST) To: Alvaro Herrera cc: Peter Koczan , pgsql-admin@postgresql.org Subject: Re: Legacy foreign keys In-reply-to: <20071210195046.GE27126@alvh.no-ip.org> References: <4544e0330712101112r6aeccfcckef378a7ea1795e07@mail.gmail.com> <20071210195046.GE27126@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Mon, 10 Dec 2007 16:50:46 -0300" Date: Mon, 10 Dec 2007 17:08:12 -0500 Message-ID: <20427.1197324492@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/43 X-Sequence-Number: 27560 Alvaro Herrera writes: > Peter Koczan escribió: >> I am having a problem with what appear to be legacy foreign keys in >> some of my databases (probably pre-7.2 days). They won't restore from >> 8.2 to 8.3, because the '' field in the called function isn't >> unique when I try to restore more than one of these legacy keys > 8.3's pg_dump contains smarts to dump these things as normal FKs. Try > it. No, pg_dump isn't involved --- the new smarts are inside the server, in CREATE CONSTRAINT TRIGGER. It sounds like Peter has a case that is confusing that new code. Could we see a complete example? regards, tom lane