Restrictions on columns are not being passed to children tables.

From: Holger Klawitter <holger(at)klawitter(dot)de>
To: pgsql-bugs(at)postgreSQL(dot)org
Subject: Restrictions on columns are not being passed to children tables.
Date: 2000-10-24 16:01:50
Message-ID: 39F5B26E.30A205AB@klawitter.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi there,

I am not sure whether this is a design flaw in the inheritance scheme
of Postgres or a generic problem with DB design (or a problem with
my understanding of inheritance in RDBS :-)

Imagine the following situation:

CREATE TABLE parent ( id INT UNIQUE );
CREATE TABLE child () INHERITS ( parent );
INSERT INTO parent VALUES ( 1 );
INSERT INTO parent VALUES ( 1 ); -- breaks as expected --
INSERT INTO child VALUES( 1 ); -- works, but shouldn't --
INSERT INTO child VALUES( 1 ); -- works even the second time --

SELECT * from parent*; -- not much of a unique, is it? --

Everything is still fine while SELECTing on "parent" instaed of
"parent*". A word of a warning might be useful in the docs :-)

Regards,
Mit freundlichem Gruß,
Holger Klawitter
--
Holger Klawitter +49 (0)251 484 0637
holger(at)klawitter(dot)de http://www.klawitter.de/

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Lockhart 2000-10-25 03:26:21 Re: Updating multiple bool values crashes backend
Previous Message pgsql-bugs 2000-10-24 12:58:59 Updating multiple bool values crashes backend