Re: Rule WHERE condition problem

Поиск
Список
Период
Сортировка
От Kristian Eide
Тема Re: Rule WHERE condition problem
Дата
Msg-id 3D2C1A19@epostleser.online.no
обсуждение исходный текст
Ответ на Rule WHERE condition problem  ("Kristian Eide" <kreide@online.no>)
Список pgsql-sql
>> 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 form
>    ON UPDATE TO b DO UPDATE b ...
>because it *will* be an infinite loop, condition or no condition.

OK, perhaps the documentation should state that recursive rules are not 
supported.

>Consider using a trigger instead.

Yes, I have written a PL/pgsql function and a trigger for this, which seems to 
work perfectly. A rule would have been much simpler though :)


Thanks.

---
Kristian



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

Предыдущее
От: "Sandy Ear"
Дата:
Сообщение: PLPGSQL language documentation
Следующее
От: "Narendra A"
Дата:
Сообщение: is there a way to get hh:mm:ss given seconds