Re: question on update/delete rules on views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: question on update/delete rules on views
Дата
Msg-id 18953.958600033@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: question on update/delete rules on views  (Kyle Bateman <kyle@actarg.com>)
Список pgsql-sql
Kyle Bateman <kyle@actarg.com> writes:
> BTW, do you have an equally sensible explanation of how the "where
> condition" that is part of the rule syntax differs from the where
> clause that comes after the "do instead"?

The rule WHERE condition determines *whether* the rule is fired for
update of a given view tuple.  (If it isn't, then that tuple is
processed as if there were no rule.)  Assuming that the rule fires,
a WHERE inside its action will determine which tuples it actually
acts on.

I think there are some examples in the docs of uses of nonempty rule
WHERE conditions.  If not, you could try looking at the rules regression
test for examples ...
        regards, tom lane


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

Предыдущее
От: Brook Milligan
Дата:
Сообщение: Re: question on update/delete rules on views
Следующее
От: Daniel Mendyke
Дата:
Сообщение: Automatic index numbers