Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E32082E0193 for ; Fri, 1 Feb 2008 14:30:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23545-04 for ; Fri, 1 Feb 2008 14:30:05 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by postgresql.org (Postfix) with ESMTP id 8E0912E0131 for ; Fri, 1 Feb 2008 14:30:05 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so789668waf.5 for ; Fri, 01 Feb 2008 10:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=jXxMFkVKwy6387Rm0ojbAdKn2AoGT89MPsJjpglVrSo=; b=CYJGLQz6gx5RT8zbhI24uiFw3aQKjmQ00y5E99GDLQPfJpOOPPnzUWiwtjmR949C8itfWU0gqHcqve75RWZAw7eX324KOjHfIC7iA7evgLMyfI/+QEDOXvQmPcwJ4L1dY0JbVgvwenTLjEkQJFCGzFQdB25zW54wmaigpGwT6vQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AJFjs4IfMTd9/zJxKTmIIkDDNh79/XT8GXyeHiElaaHjK8ofPEryns+em+ulejq0jTb+JegmmR8MLjPypwmEhy7tb8hRqs/TbXnKkFcxDZwbV2AZ6z0LejWmIoYNPYIq7wBFFEjewEEUREjAvuccs1ESb5wGYyJwyIiYh9sr1zs= Received: by 10.114.171.1 with SMTP id t1mr4342705wae.83.1201890602940; Fri, 01 Feb 2008 10:30:02 -0800 (PST) Received: by 10.114.199.4 with HTTP; Fri, 1 Feb 2008 10:30:02 -0800 (PST) Message-ID: <4544e0330802011030l477b0d8ek57909e75ff367128@mail.gmail.com> Date: Fri, 1 Feb 2008 12:30:02 -0600 From: "Peter Koczan" To: "Tom Lane" Subject: Re: Legacy foreign keys Cc: "Alvaro Herrera" , pgsql-admin@postgresql.org In-Reply-To: <18279.1201845349@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> <18279.1201845349@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/4 X-Sequence-Number: 28078 > > 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. I see what you're saying, but the weird thing is that this happened even when I did a full dump/restore of that database. I'll try out a few different things (like restoring the tables, then restoring the triggers). Hopefully I'll be able to suss out the issue or at least find a workaround. Peter