| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | jasongodden(at)optushome(dot)com(dot)au |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Rules and actions involving multiple rows |
| Date: | 2003-07-21 04:21:35 |
| Message-ID: | 200307210421.h6L4LZh26717@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
For me, triggers are for modifying the row being
updated/deleted/inserted, while rules are for modifying other rows as
part of the query.
---------------------------------------------------------------------------
Jason Godden wrote:
> Hi All,
>
> Just have a quick question regarding rules:
>
> In the past I've always used triggers to fire before or after events however I
> see that the same thing can be achieved through rules (for logging etc...) so
> I created a rule which fires on update (not DO INSTEAD) however it only seems
> to work for a single row - whereas the triggers work for all rows updated in
> a transaction. Is this correct and if so I presume I should be sticking to
> triggers if I want this kind of behaviour?
>
> Rgds,
>
> Jason
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-07-21 04:48:43 | Re: Dynamic plpgsql code |
| Previous Message | Bruce Momjian | 2003-07-21 02:30:56 | Re: Datatypes and performance |