Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 5069A2E0150 for ; Fri, 1 Feb 2008 01:59:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 01972-01 for ; Fri, 1 Feb 2008 01:59:31 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E449C2E026C for ; Fri, 1 Feb 2008 01:57:08 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m115tnPX018280; Fri, 1 Feb 2008 00:55:49 -0500 (EST) To: "Peter Koczan" cc: "Alvaro Herrera" , pgsql-admin@postgresql.org Subject: Re: Legacy foreign keys In-reply-to: <4544e0330801311613t5cc6741cx1464947c2215f198@mail.gmail.com> References: <4544e0330712101112r6aeccfcckef378a7ea1795e07@mail.gmail.com> <20071210195046.GE27126@alvh.no-ip.org> <20427.1197324492@sss.pgh.pa.us> <4544e0330712111901k1fa50c5dgb26287aff018e98c@mail.gmail.com> <10859.1197428770@sss.pgh.pa.us> <4544e0330712120940i413e3ad6y867fc2a8744f623b@mail.gmail.com> <4544e0330801311613t5cc6741cx1464947c2215f198@mail.gmail.com> Comments: In-reply-to "Peter Koczan" message dated "Thu, 31 Jan 2008 18:13:23 -0600" Date: Fri, 01 Feb 2008 00:55:49 -0500 Message-ID: <18279.1201845349@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/1 X-Sequence-Number: 28075 "Peter Koczan" writes: > I finally found more time to test this more extensively. i'm still > running into an issue with this, although it's different this time. > There are no errors printed to the terminal, but neither the foreign > key nor the trigger get made. It looks like you are trying to restore from a selective dump (-t switch) that includes only one of the two tables involved in the FK constraint. The backend logic for converting triggers to proper FK constraints can only work if it sees both tables (and their triggers) created during a single session. regards, tom lane