INSTEAD rule bug?

Поиск
Список
Период
Сортировка
От Dmitry Tkach
Тема INSTEAD rule bug?
Дата
Msg-id 3F1428AE.3090709@openratings.com
обсуждение исходный текст
Ответы Re: [BUGS] INSTEAD rule bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Billions of records?
Следующее
От: Jonathan Bartlett
Дата:
Сообщение: Re: Query Optimisation