Re: function calls optimization

From: Andrzej Barszcz <abusinf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: function calls optimization
Date: 2019-10-31 15:51:11
Message-ID: CAOUVqAzrk2KoWucrKJ5AUest2JdYrvM2qaR93QWB+COAH2EWYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

x <> 0 is evaluated first, 1/x only when x <> 0, not ?

czw., 31 paź 2019 o 16:45 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napisał(a):

> Andres Freund <andres(at)anarazel(dot)de> writes:
> > Potentially related note: for nodes like seqscan, combining the qual and
> projection processing into one expression seems to be a noticable win (at
> least when taking care do emit two different sets of deform expression
> steps).
>
> There's just one problem: that violates SQL semantics, and not in
> a small way.
>
> select 1/x from tab where x <> 0
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Igor Calabria 2019-10-31 15:51:17 Adding percentile metrics to pg_stat_statements module
Previous Message Andres Freund 2019-10-31 15:49:46 Re: function calls optimization