X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5AFE953A93 for ; Fri, 15 Apr 2005 10:38:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12037-07 for ; Fri, 15 Apr 2005 13:38:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 21AD653766 for ; Fri, 15 Apr 2005 10:38:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3FDcJj8002591; Fri, 15 Apr 2005 09:38:19 -0400 (EDT) To: Bob Smith Cc: pgsql-admin Subject: Re: Referential constraints in version 8 In-reply-to: References: Comments: In-reply-to Bob Smith message dated "Fri, 15 Apr 2005 00:31:28 -0700" Date: Fri, 15 Apr 2005 09:38:19 -0400 Message-ID: <2590.1113572299@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/203 X-Sequence-Number: 17216 Bob Smith writes: > We have just finished upgrading Postgres from 7.2 to 8, and I must live > right or something because there was only one glitch. When the dump > from 7.2 was restored into 8, some foreign key references which should > have been initially deferred had become non-deferrable. I had to > re-define those references by dropping the corresponding triggers and > using ALTER TABLE to put them back as foreign key constraints, which > seems to have fixed the problem. However, those references which I > re-defined now show up explicitly in the table descriptions as foreign > key constraints, and the corresponding triggers are not listed. This > is great since it makes the table descriptions much more intelligible, > but my concern is that all the other references which I didn't > re-define still show as triggers and not as foreign key constraints. > Is this just a cosmetic issue with psql's table description, or is > there actually a functional difference? Should I re-define all the > other foreign key constraints to be safe? Yeah, you should --- if it shows as a trigger then the system hasn't fully grokked it. The contrib/adddepend script may help you. regards, tom lane