Re: DO INSTEAD and conditional rules

From: David Wheeler <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>, Jan Wieck <JanWieck(at)yahoo(dot)com>
Subject: Re: DO INSTEAD and conditional rules
Date: 2005-04-26 06:05:56
Message-ID: b2fef70cdda15b007cbb4fd1598dcd48@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 25, 2005, at 11:00 PM, Tom Lane wrote:

> DO INSTEAD means that the *original* query will not execute; it does
> not suppress actions produced by other rules.

Ah!

> If we did not define
> it that way, I think your example would have to error out --- how
> would you choose which INSTEAD rule wins?

The documentation says that they evaluate in alphabetical order by
name. So I would expect that the first one to have its WHERE statement
evaluate to true would short-circuit the execution of the remaining
rules.

Regards,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-04-26 06:10:39 Re: DO INSTEAD and conditional rules
Previous Message Qingqing Zhou 2005-04-26 06:03:17 Re: simplify register_dirty_segment()