Re: Why can't I put a BEFORE EACH ROW trigger on a view? - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Why can't I put a BEFORE EACH ROW trigger on a view?
Date
Msg-id 45E0ECD2.8090903@commandprompt.com
Whole thread Raw
In response to Re: Why can't I put a BEFORE EACH ROW trigger on a view?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why can't I put a BEFORE EACH ROW trigger on a view?
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Why can't I put a BEFORE EACH ROW trigger on a view?