Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 2A4CA475FC1 for ; Thu, 7 Mar 2002 10:49:24 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id A7450D5FD; Thu, 7 Mar 2002 07:49:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 9CC835BFC; Thu, 7 Mar 2002 07:49:28 -0800 (PST) Date: Thu, 7 Mar 2002 07:49:28 -0800 (PST) From: Stephan Szabo To: "Andreas F." Cc: Subject: Re: confusing inheritance In-Reply-To: <3C835EA6.8010409@gmx.net> Message-ID: <20020307074720.P76547-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200203/84 X-Sequence-Number: 6965 On Mon, 4 Mar 2002, Andreas F. wrote: > I started pgAdmin and entered something like > > TABLE myObjects ( > ObjectID int4 PRIMARY KEY, > createdOn timestamp, > createdByUserID int4 > ) > > then > > TABLE myTerminatedObjects ( > validFrom timestamp, > validUntil timestamp > ) INHERITS myObjects > > Obviously myTerminatedObjects stores it's values of inherited fields in > the tablespace of myObjects breaking myObjects integrity without > PostgreSQL complainig about. > Am I right ? > > And myTerm... inherits the field "ObjectID" but not in the function as > primary key so it has no key at all ? > At least MS-Access 2K told me so. > > > May someone give me a pointer to whats going on, please ? Unique, primary and foreign keys do not currently inherit to child tables which causes the behavior you were seeing.