Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 2229D4758A7 for ; Thu, 11 Jul 2002 12:00:44 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id E9615D5F7; Thu, 11 Jul 2002 09:00:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id DF1FA5C02; Thu, 11 Jul 2002 09:00:48 -0700 (PDT) Date: Thu, 11 Jul 2002 09:00:48 -0700 (PDT) From: Stephan Szabo To: =?iso-8859-1?q?frederik=20nietzsche?= Cc: Subject: Re: how to inherits the references... In-Reply-To: <20020711144358.42879.qmail@web12906.mail.yahoo.com> Message-ID: <20020711085735.H63911-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200207/165 X-Sequence-Number: 8544 On Thu, 11 Jul 2002, [iso-8859-1] frederik nietzsche wrote: > as if the sigles where not in the "sigles" table, but > it's there! > it's probably because of the way in which psql threats > the inheritance. > my question is (finally): is there some workaround for > this?? or: am I making some mistakes?? Foreign keys don't inherit to children table on either the fk or pk side. Note also that the primary keys in the above will not guarantee that sigle is unique across the whole set, only across each table individually. Pretty much the only workaround I know of is to make a table with the key columns and have each of the tables in the inheritance tree have its key columns reference that and anything that wants to reference the inheritance tree references the other table instead.