Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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                    
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 

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group