bug in rule?

From: sferriol <sylvain(dot)ferriol(at)imag(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: bug in rule?
Date: 2004-03-10 13:15:10
Message-ID: 404F14DE.1070204@imag.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-03-10 13:49:16 Re: Sudden semi-deterministic disconnection between queries
Previous Message Dexter Tad-y 2004-03-10 12:58:01 [NEWBIE] need help optimizing this query