| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера