Re: Inheritance Question

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Neil Burrows <nburrows(at)ssh(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inheritance Question
Date: 2001-02-21 17:15:44
Message-ID: Pine.BSF.4.21.0102210913060.8237-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wed, 21 Feb 2001, Neil Burrows wrote:

> Hi,
>
> A quick question about Inheritance here.
>
> If a table has FOREIGN or PRIMARY KEYs in it, and then another table which
> inherits this table is created, the inherited table will not have the KEY
> constraints. Is this correct?

Yes currently, although that's not guaranteed to stay true, since most
people using inheritance want the constraints to be inherited, there's
just been a question of what that means precisely and how to do it.

For what you're doing, I'd suggest making a base table that defines the
"type" and inheriting two copies one for your main table and one for the
history.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-02-21 17:23:27 Re: C function woes
Previous Message Stephan Szabo 2001-02-21 17:12:28 Re: sequence and stored procedure