dbTalk Databases Forums  

[BUGS] BUG #2355: Problem with INHERITS

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


Discuss [BUGS] BUG #2355: Problem with INHERITS in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jaime Lara Alvarez
 
Posts: n/a

Default [BUGS] BUG #2355: Problem with INHERITS - 03-24-2006 , 03:21 PM







The following bug has been logged online:

Bug reference: 2355
Logged by: Jaime Lara Alvarez
Email address: jimmy_tec (AT) yahoo (DOT) com.mx
PostgreSQL version: 8.1.3
Operating system: Windows
Description: Problem with INHERITS
Details:

// ----------- 1 --------------------------- //

CREATE TABLE cities (
id varchar(5) PRIMARY KEY,
name text
);

CREATE TABLE capitals (
state text
) INHERITS (cities);

//------------ 2 ------------------------------//
insert into cities values ('C-001','Houston');
insert into cities values ('C-002','San Antonio');

insert into capitals values ('C-003','Dallas','TX');

// ------------3 --------------------------------//
insert into cities values ('C-004','Washington')

insert into capitals values ('C-004','Washington','W')

//------------ 4 ---------------------------------//

select * from cities

Data Output
Row id(varchar) name(text)
1 "C-001" "Houston"
2 "C-002" "San Antonio"
3 "C-004" "Washington" <------
4 "C-003" "Dallas"
5 "C-004" "Washington" <------

That's a problem with the primary key

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2355: Problem with INHERITS - 03-24-2006 , 03:51 PM






"Jaime Lara Alvarez" <jimmy_tec (AT) yahoo (DOT) com.mx> writes:
Quote:
That's a problem with the primary key
Please note the caveats at the bottom of
http://www.postgresql.org/docs/8.1/s...l-inherit.html

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


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.