Re: Rule WHERE condition problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule WHERE condition problem
Дата
Msg-id 3454.1026220985@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rule WHERE condition problem  ("Kristian Eide" <kreide@online.no>)
Список pgsql-sql
"Kristian Eide" <kreide@online.no> writes:
> ERROR:  query rewritten 10 times, may contain cycles

> It would seem that my WHERE clause is not checked before the action is run.

No, the WHERE clause is essentially transformed into part of the rule
query.  You can't ever write a rule of the formON UPDATE TO b DO UPDATE b ...
because it *will* be an infinite loop, condition or no condition.

Consider using a trigger instead.
        regards, tom lane


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

Предыдущее
От: "Roger Mathis"
Дата:
Сообщение: Variables in PSQL
Следующее
От: "Sandy Ear"
Дата:
Сообщение: PLPGSQL language documentation