From: | "Steven Mooij" <steven(at)mooij(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1662: Table constrains are not properly inherited. |
Date: | 2005-05-11 23:33:08 |
Message-ID: | 20050511233308.9A809F0B08@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1662
Logged by: Steven Mooij
Email address: steven(at)mooij(dot)org
PostgreSQL version: 7.4.7
Operating system: i386-pc-linux-gnu, compiled by GCC i386-linux-gcc (GCC)
3.3.5 (Debian 1:3.3.5-12)
Description: Table constrains are not properly inherited.
Details:
When a table is inherited from, it's table constraints are 'disabled':
CREATE TABLE super (x INTEGER, PRIMARY KEY (x));
CREATE TABLE sub (y INTEGER) INHERITS (super);
INSERT INTO sub VALUES (1, 1);
INSERT INTO sub VALUES (1, 2);
INSERT INTO super VALUES (1);
This should result in a 'duplicate key violation' for the unique constraint
on super(x), but it doesn't.
In this case
SELECT x FROM super;
results in:
x
---
1
1
1
(3 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Beckstette | 2005-05-12 00:06:42 | Re: Missing tables in postgresql 7.2.4 |
Previous Message | Alvaro Herrera | 2005-05-11 20:44:29 | Re: BUG #1660: Growing used memory and critical performance loss |