BUG #2355: Problem with INHERITS

From: "Jaime Lara Alvarez" <jimmy_tec(at)yahoo(dot)com(dot)mx>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2355: Problem with INHERITS
Date: 2006-03-24 01:21:56
Message-ID: 200603240121.k2O1Luut048607@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2355
Logged by: Jaime Lara Alvarez
Email address: jimmy_tec(at)yahoo(dot)com(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jim C. Nasby 2006-03-24 13:21:44 Nightly builds (was: [SQL] Function Parameters in GROUP BY clause cause errors)
Previous Message Carlos Rivas 2006-03-23 23:25:02 Error in ecpg