Re: Wrong aggregate result when sorting by a NULL value

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, obouda(at)email(dot)cz, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Wrong aggregate result when sorting by a NULL value
Date: 2018-11-04 14:11:36
Message-ID: CAMkU=1xTHkS6d0iptCWykHc1Xrh3LBic_gZDo3JzDYru815fLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Nov 3, 2018 at 7:08 PM Andres Freund <andres(at)anarazel(dot)de> wrote:

> >
> > Hm, I'm somewhat confused, let me look into that. The JIT code shouldn't
> > really need to be changed here - it's the *generation* of expression
> > steps that's going wrong - which then later get turned into JITed code,
> > but that part worked previously for other expressions.
>
> Turns out it's not a great idea to generate EEOP_AGG_STRICT_INPUT_CHECK
> expressions with nargs = 0. Head -> Desk. Pushed a fix (+ new
> assertion).
>
>
I'm now getting a compiler warning:

execExpr.c: In function 'ExecBuildAggTrans':
execExpr.c:2864:7: warning: unused variable 'numInputs' [-Wunused-variable]
int numInputs = pertrans->numInputs;

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-11-04 16:19:59 Re: Wrong aggregate result when sorting by a NULL value
Previous Message Andrew Gierth 2018-11-04 11:53:11 Re: BUG #15485: Order by of inlineable stable function incorrect