INSTEAD rule bug?

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: INSTEAD rule bug?
Date: 2003-07-15 16:15:42
Message-ID: 3F1428AE.3090709@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Here is a problem a ran into:

testdb=# create table test (x int);
CREATE TABLE
testdb=# create table test_view as select * from test;
SELECT
testdb=# create rule insert_test as on insert to test_view do instead
insert into test values (new.*);
CREATE RULE
testdb=# create rule skip_test as on insert to test_view where x is null
do instead nothing;
CREATE RULE
testdb=# insert into test_view values (null);
INSERT 17259 1
testdb=# select * from test;
x
---

(1 row)

According to the last rule the insert should not have happened, right?
How come it got ignored?

Thanks!

Dima

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-15 16:21:53 Another bug with views
Previous Message Jefferies, Rupert 2003-07-15 10:14:39 createdb failure on version 7.3.3 with Solaris 9

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Bartlett 2003-07-15 16:21:26 Re: Query Optimisation
Previous Message Stephan Szabo 2003-07-15 16:09:19 Re: [GENERAL] Query Optimisation