Re: Why can't I put a BEFORE EACH ROW trigger on a view?

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Why can't I put a BEFORE EACH ROW trigger on a view?
Дата
Msg-id 45E0ECD2.8090903@commandprompt.com
обсуждение исходный текст
Ответ на Re: Why can't I put a BEFORE EACH ROW trigger on a view?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> I recall a prior discussion about making it possible to use triggers on
> views as a substitute for DO INSTEAD rules, by removing the rewrite-time
> check and only erroring out if we actually get to the point of
> attempting a physical insert.  Then a BEFORE INSERT trigger could do
> something appropriate with the data and return NULL to prevent the
> error.  This seems like a good idea because triggers often are much
> easier to work with than rules ---

It is also my experience that triggers are faster than rules. At least
with table partitioning.


Joshua D. Drake




--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Why can't I put a BEFORE EACH ROW trigger on a view?
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Why can't I put a BEFORE EACH ROW trigger on a view?