Re: Wrong aggregate result when sorting by a NULL value - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: Wrong aggregate result when sorting by a NULL value
Date
Msg-id CAMkU=1xTHkS6d0iptCWykHc1Xrh3LBic_gZDo3JzDYru815fLQ@mail.gmail.com
Whole thread Raw
In response to Re: Wrong aggregate result when sorting by a NULL value  (Andres Freund <andres@anarazel.de>)
Responses Re: Wrong aggregate result when sorting by a NULL value  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sat, Nov 3, 2018 at 7:08 PM Andres Freund <andres@anarazel.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

pgsql-bugs by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: BUG #15485: Order by of inlineable stable function incorrect
Next
From: Tom Lane
Date:
Subject: Re: Wrong aggregate result when sorting by a NULL value