BUG #1055: no keys in inherited table with primary key when inserting into inheriting table

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1055: no keys in inherited table with primary key when inserting into inheriting table
Дата
Msg-id 20040120152230.002C5CF4B7F@www.postgresql.com
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1055
Logged by:          Agri

Email address:      agri@desnol.ru

PostgreSQL version: 7.4

Operating system:   PC-linux-gnu

Description:        no keys in inherited table with primary key when
inserting into inheriting table

Details:

let me desribe a bug in the term of sql commands:
create table first (id int primary key );
create table second (f2 int) inherits (first);
create table third (ref_id int);
alter table third add constraint third_ref_first foreign key (ref_id)
references first;
insert into second (id, f2) values (1, 1);

and at last a bug insert:
insert into third (ref_id) values (1);
results in:
ERROR:  insert or update on table "third" violates foreign key constraint
"third_ref_first"

if i get a select:
select * from first;
 id
----
  1
(1 row)

bug is: values are not added into primary key of the inherited table when
records are inserted into the inheriting table

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unique index problems
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1056: ecpg ignores WHENEVER NOT FOUND