Re: confusing inheritance - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: confusing inheritance
Date
Msg-id 20020307074720.P76547-100000@megazone23.bigpanda.com
Whole thread Raw
In response to confusing inheritance  ("Andreas F." <maps.on@gmx.net>)
List pgsql-sql
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.




pgsql-sql by date:

Previous
From: "Andreas F."
Date:
Subject: confusing inheritance
Next
From: daq
Date:
Subject: Re: PL/pgSQL Syntax Problem