Re: function calls optimization - Mailing list pgsql-hackers

From Andres Freund
Subject Re: function calls optimization
Date
Msg-id 6650682E-4D48-4828-A4DA-629B185179FA@anarazel.de
Whole thread Raw
In response to Re: function calls optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On October 31, 2019 8:45:26 AM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>Andres Freund <andres@anarazel.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

The expression would obviously have to return early, before projecting, when not matching the qual? I'm basically just
thinkingof first executing the steps for the qual, and in the success case execute the projection steps before
returningthe quals positive result.  

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: function calls optimization
Next
From: Andrzej Barszcz
Date:
Subject: Re: function calls optimization