Re: BUG #4271: dropped columns conflict with returning rules

Поиск
Список
Период
Сортировка
От Alexey Bashtanov
Тема Re: BUG #4271: dropped columns conflict with returning rules
Дата
Msg-id 1214756706.10586.1260956173@webmail.messagingengine.com
обсуждение исходный текст
Ответ на Re: BUG #4271: dropped columns conflict with returning rules  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hello, Tom!

> What did you do *exactly*?

Here's the example of command sequence that lead to this error:

luh=# create table foo(a int);
CREATE TABLE
luh=# alter TABLE foo add column b int;
ALTER TABLE
luh=# alter TABLE foo drop column b;
ALTER TABLE
luh=# alter TABLE foo add column c int;
ALTER TABLE
luh=# create table foo_child() inherits (foo);
CREATE TABLE
luh=# create or replace rule myrule as on insert to foo do instead
insert into foo_child values(new.*) returning foo_child.*;
ERROR:  cannot convert relation containing dropped columns to view
luh=#

> > this rule started to work incorrectly: it did not store foo and quackquack
> > values but used nulls instead.
>
> This is expected behavior because the * expressions are expanded when
> the rule is defined:

That's OK

Thanks,
 Alexey

--
http://www.fastmail.fm - The way an email service should be

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4271: dropped columns conflict with returning rules
Следующее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: BUG #4274: uuid returns duplicate values