Re: Wrong aggregate result when sorting by a NULL value

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ondřej Bouda <obouda(at)email(dot)cz>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Wrong aggregate result when sorting by a NULL value
Date: 2018-11-03 05:57:00
Message-ID: 20181103055700.etsffelwr2rhrphh@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2018-11-02 17:34:43 +0000, Andrew Gierth wrote:
> >>>>> "Andres" == Andres Freund <andres(at)anarazel(dot)de> writes:
>
> >> Andres, do you have time to look at this right now?
>
> Andres> Thanks for bisecting. I'll take a look later today.
>
> Looks like this:
>
> + scratch.d.agg_strict_input_check.nargs = numInputs;
>
> should have been pertrans->numTransInputs instead?

That looks like it's precisely the reason. I'll push something tomorrow
PST morning, crediting both you (diagnosis) and Tom (bisecting)
obviously, unless you prefer to do so yourself.

It's a bit sad that we don't have any tests that test this :/. I'll add
something for the specific case, but that'll obviously not be
exhaustive.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2018-11-03 09:13:44 Re: BUG #15460: Error while creating index or constraint
Previous Message Tom Lane 2018-11-03 04:44:30 Re: BUG #15476: Problem on show_trgm with 4 byte UTF-8 characters