Re: changing an update via rules

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: changing an update via rules
Дата
Msg-id 20030719231214.Y55138-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на changing an update via rules  (Lauren Matheson <lmatheson@ivcf.ca>)
Список pgsql-sql
On 15 Jul 2003, Lauren Matheson wrote:

> Hello,
>
> I am having difficulty setting an on update rule which seems to be
> caught in a recursive loop.
>
> Context is a table with three columns assigning users to groups with the
> third column being boolean to flag the primary group.  I would like to
> set an update rule to enforce one primary group.  Any suggestions on how
> to do this, or exactly how the code is getting trapped?  My code is

Rules are like macro rewrites and the WHERE clauses will not help to break
the recursive loop.  I think you may need to either use a trigger or
something like a view so that the actual action happens on a different
table.



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

Предыдущее
От: Matthew Horoschun
Дата:
Сообщение: Re: SECURITY DEFINER changes CURRENT_USER?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: min() and NaN