Re: Inheritance

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Ian Turner <vectro(at)pipeline(dot)com>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: Inheritance
Date: 2000-07-31 05:40:08
Message-ID: 200007310540.e6V5eAA23294@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jan Wieck wrote:
>> Yes, but what about referential integrity? Can I have a table column
>> reference a column from Entities*? In my experimentation, this is not the
>> case.
>
> Referential integrity doesn't work with inheritance, and will
> not in 7.1.
>
> It isn't possible to put a unique constraint on a column of
> Entities* (AFAIK). So that a SELECT pkey FROM Entities will
> never return any duplicates? The RI implementation of
> PostgreSQL doesn't insist on such a unique constraint to
> exist up to now, but it is required by the SQL specs and thus
> we'll do so someday.

The corollary of using RI on an inheritance tree is that there should be a
unique index on the primary keys of the whole tree. If constraints could be
inherited, this would become available.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Have not I commanded thee? Be strong and of a good
courage; be not afraid, neither be thou dismayed; for
the LORD thy God is with thee whithersoever thou
goest." Joshua 1:9

Browse pgsql-general by date

  From Date Subject
Next Message Erich 2000-07-31 06:17:07 How to find the max value in a select?
Previous Message Thomas Lockhart 2000-07-31 05:26:50 Re: [HACKERS] Hmm ... shouldn't path_distance be MIN distance not MAX distance?