BUG #2355: Problem with INHERITS - Mailing list pgsql-bugs

From Jaime Lara Alvarez
Subject BUG #2355: Problem with INHERITS
Date
Msg-id 200603240121.k2O1Luut048607@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2355: Problem with INHERITS
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2355
Logged by:          Jaime Lara Alvarez
Email address:      jimmy_tec@yahoo.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

pgsql-bugs by date:

Previous
From: Carlos Rivas
Date:
Subject: Error in ecpg
Next
From: "Philip Crotwell"
Date:
Subject: BUG #2356: sqrt and cbrt return different types