inherited tables failure

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема inherited tables failure
Дата
Msg-id 200108161706.f7GH65R32364@hub.org
обсуждение исходный текст
Ответы Re: inherited tables failure  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: inherited tables failure  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Laszlo Csite (ozy@tiszanet.hu) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
inherited tables failure

Long Description
We have two tables inherited one from the other one. If you try to insert from the parent into the child by an "INSERT
INTO"statement then the record is inserted into the child but into the parent too! Therefore in the parent duplicated
rowsappear.  

The other bug is if you delete a row from the parent then it erases from the child too. see the illustration below.


Sample Code

create table try (col1 int4);
create table try1 () inherits (try);
insert into try (col1) values (15);
select * from try1;   --> you get 0 row
select * from try;   --->you get 1 row
insert into try1 select * from try;  --> the answer is 1 row is inserted into try1

select * from try1;   --> you get 1 row
select * from try;   --->you get 2 row !!!!!!!!!!! <-That's wrong

delete from try;
select * from try1;   --> you get 0 row !!!!!!!!!!! <-That's wrong
select * from try;   --->you get 0 row



No file was uploaded with this report

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: -ltermcap needed for psql client build on OpenBSD 2.9
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: inherited tables failure