Обсуждение: bug in rule?

Поиск
Список
Период
Сортировка

bug in rule?

От
sferriol
Дата:
hello i'm using postgres 7.2.1
and i'm using rule

example:
create rule test_rule
as on insert to test
do instead
(insert into test2
(select NEW.id where NEW.id='1'));

this works but the return string in psql is false
example:
insert into test(id) values ('2');
INSERT 0 0

normal, '2' is different from '1'

but
insert into test(id) values ('1');
INSERT 0 0

bug, it instert a line in table test2
  select * from test2;
  id
----
  1
so the return must be
INSERT 0 1

IS IT A BUG?

sylvain







Вложения

Re: bug in rule?

От
Tom Lane
Дата:
sferriol <sylvain.ferriol@imag.fr> writes:
> hello i'm using postgres 7.2.1
                           ^^^^^

This was fixed some time ago ... but not *that* long ago.  Update.

            regards, tom lane