Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C7C872E02D1 for ; Sat, 2 Feb 2008 15:43:19 -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 70199-01 for ; Sat, 2 Feb 2008 15:43:17 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by postgresql.org (Postfix) with ESMTP id F018E2E01ED for ; Sat, 2 Feb 2008 15:43:16 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so1495559waf.5 for ; Sat, 02 Feb 2008 11:43:16 -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=q0Gicy0QfogDjZ7Ww4/K7r5+bJywfhAPkT0dPSVGW2E=; b=kHy1EB9ol+Hu1Q2+4icgHkiBiUoWEeofw8FKNTyCKfP/mDhA3ZtkEwtRQw998g0QZy8bLdlDCEToSQn7Na7xQWkcpsU1YYKlcAWAIkJ7w9WjpbKIOJNIboPRgCK2oXa4nCaoI3SAIVo2eueEgq04c46G/7DFY2hclQFT1y6Xcok= 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=dUuoYTlqs85vMr21GYkHk1FLTF3mejR1GdrCvESMnp8ecmQus5qNb/eR3x2DN/SxSy4lDt+ozTqQmKYMMy3v9tyRgBh74sdjmbpfYJc8C9hU9bwxWjw87cFKYjnAXOhOVaSdZ3YNDX9klP/eTBh7d9gFohohAkQ5/IOfMnLN7VQ= Received: by 10.114.103.1 with SMTP id a1mr5413649wac.59.1201981395941; Sat, 02 Feb 2008 11:43:15 -0800 (PST) Received: by 10.114.199.4 with HTTP; Sat, 2 Feb 2008 11:43:15 -0800 (PST) Message-ID: <4544e0330802021143n2d38dce8k4ff9ab271aa35c2a@mail.gmail.com> Date: Sat, 2 Feb 2008 13:43:15 -0600 From: "Peter Koczan" To: "Tom Lane" Subject: Re: Legacy foreign keys Cc: "Alvaro Herrera" , pgsql-admin@postgresql.org In-Reply-To: <17999.1201909980@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> <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> <4544e0330802011030l477b0d8ek57909e75ff367128@mail.gmail.com> <4544e0330802011539j78ab6d2eofcf58e9442031115@mail.gmail.com> <17999.1201909980@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/7 X-Sequence-Number: 28081 > Yeah, it's expecting to see a set of three related triggers. For > instance, if I do this in a 7.0 database: > ... > If your original database doesn't have all three triggers, then you had > a problem already --- the FK constraint wasn't being enforced properly. Ah, these were from before I became the main database admin. It was probably some previous admin or programmer who thought he could be clever and drop the other FK-related triggers. > In 8.3, you could look for the pg_trigger entries with zero tgconstraint > values. However, prior versions don't have that column; you'd have to > look instead for entries that aren't linked to a pg_constraint entry > by a pg_depend entry. Thanks again, I should have enough info to fix this now. Peter