bug in rule?

Поиск
Список
Период
Сортировка
От sferriol
Тема bug in rule?
Дата
Msg-id 404F14DE.1070204@imag.fr
обсуждение исходный текст
Ответы Re: bug in rule?
Список pgsql-general
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







Вложения

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

Предыдущее
От: Dexter Tad-y
Дата:
Сообщение: [NEWBIE] need help optimizing this query
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Sudden semi-deterministic disconnection between queries