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 4291A53A98 for ; Fri, 15 Apr 2005 09:45:12 -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 91857-10 for ; Fri, 15 Apr 2005 12:45:07 +0000 (GMT) Received: from sunsite.dcc.uchile.cl (sunsite.dcc.uchile.cl [192.80.24.2]) by svr1.postgresql.org (Postfix) with ESMTP id CEE5B53AB2 for ; Fri, 15 Apr 2005 09:45:06 -0300 (ADT) Received: from anakena.dcc.uchile.cl (anakena [192.80.24.6]) by sunsite.dcc.uchile.cl (8.12.11/8.12.11) with ESMTP id j3FCj7Mm010784; Fri, 15 Apr 2005 08:45:07 -0400 (CLT) Received: by anakena.dcc.uchile.cl (Postfix, from userid 4151) id AFDA552C03; Fri, 15 Apr 2005 08:45:07 -0400 (CLT) Date: Fri, 15 Apr 2005 08:45:07 -0400 From: Alvaro Herrera To: Bob Smith Cc: pgsql-admin Subject: Re: Referential constraints in version 8 Message-ID: <20050415124507.GA31521@dcc.uchile.cl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.343 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200504/201 X-Sequence-Number: 17214 On Fri, Apr 15, 2005 at 12:31:28AM -0700, Bob Smith wrote: > 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? I suggest you run contrib/adddepend against that database. It will try to add the missing information to the system catalogs so that the FKs appear as such and not triggers. -- Alvaro Herrera () "Uno puede defenderse de los ataques; contra los elogios se esta indefenso"