create rule on select question

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема create rule on select question
Дата
Msg-id 2f4958ff0810090209g44a9ee4aw925fa523b9987431@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
test1=# \d+ testb
  View "public.testb"
 Column | Type | Modifiers | Description
--------+---------+--------------------+-------------
 id | bigint | |
 pid | integer | |
 b | integer | not null default 1 |
View definition:
 SELECT testb.id, testb.pid, 1 AS b
  FROM testb
  WHERE testb.b <> 0;

test1=# insert into testb(id, pid) values (1, 666);
ERROR: infinite recursion detected in rules for relation "testb"

I have to admit, I don't get that error. Rule is on select, not insert/update.

--
GJ

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

Предыдущее
От: Galland Gregoire
Дата:
Сообщение: Run postgresql engine in readonly mode?
Следующее
От: chrisj
Дата:
Сообщение: ROWTYPE inserts