Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIdLT-0006W6-LD for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Nov 2018 17:34:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIdLR-0004Ic-OU for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Nov 2018 17:34:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIdLR-0004IV-Eg for pgsql-bugs@lists.postgresql.org; Fri, 02 Nov 2018 17:34:53 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIdLN-0002Kx-NX for pgsql-bugs@postgresql.org; Fri, 02 Nov 2018 17:34:52 +0000 Received: from [192.168.127.1] (port=58382 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gIdLJ-000KHf-22; Fri, 02 Nov 2018 17:34:45 +0000 Received: from [127.0.0.1] (port=10866 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gIdLI-000I6p-8H; Fri, 02 Nov 2018 17:34:44 +0000 From: Andrew Gierth To: Andres Freund Cc: Tom Lane , =?utf-8?Q?Ond=C5=99ej?= Bouda , pgsql-bugs@postgresql.org Subject: Re: Wrong aggregate result when sorting by a NULL value In-Reply-To: <20181102154050.6prklkv37wdqvilx@alap3.anarazel.de> (Andres Freund's message of "Fri, 2 Nov 2018 08:40:50 -0700") Message-ID: <87y3ab2ykj.fsf@news-spur.riddles.org.uk> References: <2a505161-2727-2473-7c46-591ed108ac52@email.cz> <30923.1541171251@sss.pgh.pa.us> <32176.1541172886@sss.pgh.pa.us> <20181102154050.6prklkv37wdqvilx@alap3.anarazel.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Fri, 02 Nov 2018 17:34:43 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Andres" == Andres Freund 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? -- Andrew (irc:RhodiumToad)