Re: rules, triggers and views
От | Tom Lane |
---|---|
Тема | Re: rules, triggers and views |
Дата | |
Msg-id | 19535.1102287720@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | rules, triggers and views (elein <elein@varlena.com>) |
Ответы |
Re: rules, triggers and views
|
Список | pgsql-hackers |
elein <elein@varlena.com> writes: > Also, what are the reasons for forbidding triggers on views? The fact that they'd never fire (or better never fire). A view does not actually store any tuples, so update and delete triggers on it are certainly useless. You could imagine allowing BEFORE INSERT triggers, with the understanding that nothing will be inserted no matter what the trigger returns ... but such a trigger is still useless unless we remove the safety restriction that says you can't INSERT into a view without having an ON INSERT DO INSTEAD rule. What you are probably wishing you had is some sort of ability to trigger on "virtual", pre-rewriter operations, but the executor and the trigger mechanism know nothing of this. regards, tom lane
В списке pgsql-hackers по дате отправления: