Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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/



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux