On Thu, Aug 30, 2012 at 6:31 PM, John Lumby <johnlumby(at)hotmail(dot)com> wrote:
>
> I would like to use an UPDATE RULE to modify the action performed
> when any UPDATE is attempted on a certain table,
> *including* an UPDATE which would fail because of no rows matching the
> WHERE.
>
> Is this at all possible? I have tried with variations of ALSO|INSTEAD
> etc
> but the RULE is never invoked in the failing case. And my reading of
> chapter 38.3.1. How Update Rules Work
> is that the original query's quallification is always present.
>
>
You did not mention why you need such a facility, but AFAICS RULEs will
only be applied on the qualifying rows. So as you rightly figured out, you
won't see them firing unless there are any qualifying rows. Is this not
something you can achieve via statement-level triggers though ?
Thanks,
Pavan