dbTalk Databases Forums  

[BUGS] BUG #1662: Table constrains are not properly inherited.

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1662: Table constrains are not properly inherited. in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steven Mooij
 
Posts: n/a

Default [BUGS] BUG #1662: Table constrains are not properly inherited. - 05-13-2005 , 08:35 AM







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)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.