Re: function calls optimization

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

Hi

I need advice.
ResetExprContext(econtext) is defined as
MemoryContextReset((econtext)->ecxt_per_tuple_memory).
I can register callback in MemoryContext but it is always cleaned on every
call to MemoryContextReset().
How to reset some fields of ExprContext ( living in per_query_memory ) when
ResetExprContext is called ?

czw., 31 paź 2019 o 16:52 Andres Freund <andres(at)anarazel(dot)de> napisał(a):

> Hi,
>
> On October 31, 2019 8:51:11 AM PDT, Andrzej Barszcz <abusinf(at)gmail(dot)com>
> wrote:
> >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
>
> On postgres lists the policy is to reply below the quoted bit, and to trim
> the quote appropriately.
>
> Andres
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2019-11-18 14:40:51 Re: Role membership and DROP
Previous Message Amit Khandekar 2019-11-18 12:59:43 Re: logical decoding : exceeded maxAllocatedDescs for .spill files