pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Andreas F. <maps.on@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: confusing inheritance
Date: Thu, 7 Mar 2002 07:49:28 -0800 (PST)
Message-ID: <20020307074720.P76547-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3C835EA6.8010409@gmx.net>

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.





view thread (2+ messages)

Message-ID: <20020307074720.P76547-100000@megazone23.bigpanda.com>
Permalink:  ../20020307074720.P76547-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020307074720.P76547-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, maps.on@gmx.net
  Subject: Re: confusing inheritance
  In-Reply-To: <20020307074720.P76547-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox