update rule loops

Поиск
Список
Период
Сортировка
От Poul L. Christiansen
Тема update rule loops
Дата
Msg-id 399D4FD0.11A258FB@faroenet.fo
обсуждение исходный текст
Ответы Re: update rule loops
Список pgsql-sql
Hi

I'm trying to make a field in my table (datechanged) to automatically be
updated with the value 'now()' when an update on the table occurs.

plc=# create rule datechanged_radius AS ON update to radius do update
radius set datechanged ='now()';
CREATE 22025360 1
plc=# update radius set destinationip = '212.055.059.001';
ERROR:  query rewritten 10 times, may contain cycles

This means that it's going in a loop, because the rule triggers itself.

Is there another way to do this?

Thanks,
Poul L. Christiansen



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

Предыдущее
От: Yury Don
Дата:
Сообщение: Re: sequences in functions
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Continuous inserts...