On Fri, Feb 9, 2018 at 8:06 PM, Robert Haas <robertmh...@gmail.com> wrote:

> On that basis, of the options I listed in
> http://postgr.es/m/CA+TgmoZDL-caukHkWet7sr7sqr0-e2T91+
> devhqen5sfqsm...@mail.gmail.com
> I like #1 least.
> I also dislike #4 from that list for the reasons stated there.  For
> example, if you say WHEN MATCHED AND x.some_boolean and then WHEN
> MATCHED, you expect that every tuple that hits the latter clause will
> have that Boolean as false or null, but #4 makes that not true.
> I think the best options are #2 and #5 -- #2 because it's simple, and
> #5 because it's (maybe) more intuitive, albeit at the risk of
> livelock.

As you said, #5 seems the best and that's what the patch does. But ISTM
that the options you listed are not really the concerning points. As the
patch stands today, we evaluate WHEN AND conditions separately, outside the
EPQ. The problem arises when the join qual returns a different result with
the updated tuple. I listed down those cases in my earlier email in the
day. To me (and I assume to Peter and Simon too), those are the more
interesting cases.


 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Reply via email to