Re: confusing inheritance

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Andreas F(dot)" <maps(dot)on(at)gmx(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: confusing inheritance
Date: 2002-03-07 15:49:28
Message-ID: 20020307074720.P76547-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message daq 2002-03-07 16:18:02 Re: PL/pgSQL Syntax Problem
Previous Message jmycr 2002-03-07 14:08:26 subquery involving 'now'