Unexpected output of PgRules

From: Manav Kumar <mkumar(at)yugabyte(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Unexpected output of PgRules
Date: 2025-05-14 09:14:30
Message-ID: CAPhCW+9BU7vkq3jkZKv1NTmfQ7YyJsMn_ONfxviQVrX7wAJ8HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Team,
I'm writing to clarify one of the expected output in rules.out file.

Why does value at this line
https://github.com/postgres/postgres/blob/913c60b067aa1a618420fd0372c4df3cf5501863/src/test/regress/expected/rules.out#L594
for rtest_t6 is zeros. When we have defined the rule for rtest_t6 as:
create rule rtest_t4_ins2 as on insert to rtest_t4
where new.a >= 20 and new.a < 30 do
insert into rtest_t6 values (new.a, new.b);

Therefore:
At
https://github.com/postgres/postgres/blob/913c60b067aa1a618420fd0372c4df3cf5501863/src/test/regress/expected/rules.out#L576
/ insert into rtest_t4 select * from rtest_t9 where b ~ 'and t8';
Shouldn't insert the rows with value as 26 and 28 as well. Isn't it ? as
rules says to insert the rows in rtest_t6 tables if value is from
20(inclusive) to 30 (exclusive).

Please help me with the clarification.

Thanks
Manav

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Manav Kumar 2025-05-14 10:40:14 Re: Unexpected output of PgRules
Previous Message 萧鸿骏 2025-05-14 08:23:19 Re: BUG #18927: Poor query plan - HashAggregate is more than twice as fast but at a higher cost