| From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Why can't I put a BEFORE EACH ROW trigger on a view? | 
| Date: | 2007-02-25 01:56:34 | 
| Message-ID: | 45E0ECD2.8090903@commandprompt.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Karl O. Pinc | 2007-02-25 02:30:21 | Re: Why can't I put a BEFORE EACH ROW trigger on a view? | 
| Previous Message | Tom Lane | 2007-02-25 01:48:58 | Re: Why can't I put a BEFORE EACH ROW trigger on a view? |