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 1gJS9S-0006ZU-HX for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Nov 2018 23:49:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJS9Q-0006Cd-Mh for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Nov 2018 23:49:52 +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 1gJS9Q-0006CV-8S for pgsql-bugs@lists.postgresql.org; Sun, 04 Nov 2018 23:49:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJS9N-0000ld-ME for pgsql-bugs@postgresql.org; Sun, 04 Nov 2018 23:49:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA4Nne9s024675; Sun, 4 Nov 2018 18:49:40 -0500 From: Tom Lane To: Andres Freund cc: Jeff Janes , Andrew Gierth , obouda@email.cz, Pg Bugs Subject: Re: Wrong aggregate result when sorting by a NULL value In-reply-to: <20181104234410.f63uu33kfxy2zgjx@alap3.anarazel.de> References: <32176.1541172886@sss.pgh.pa.us> <20181102154050.6prklkv37wdqvilx@alap3.anarazel.de> <87y3ab2ykj.fsf@news-spur.riddles.org.uk> <20181103055700.etsffelwr2rhrphh@alap3.anarazel.de> <20181103215009.slavgzc2kvyhpxlf@alap3.anarazel.de> <30989.1541283520@sss.pgh.pa.us> <20181103222709.c2hqlbipo7f53nx3@alap3.anarazel.de> <20181103230837.6rv63tajaodxmp6j@alap3.anarazel.de> <26185.1541348399@sss.pgh.pa.us> <20181104234410.f63uu33kfxy2zgjx@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 04 Nov 2018 15:44:10 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24673.1541375380.1@sss.pgh.pa.us> Date: Sun, 04 Nov 2018 18:49:40 -0500 Message-ID: <24674.1541375380@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-11-04 11:19:59 -0500, Tom Lane wrote: >> Used-for-asserts-only problem. Will fix. > Thanks. I wonder if we shouldn't turn Asserts() into something roughly > akin to if (0) {expr};. That way we'd not deal with errors about unused > variables anymore - we're not safe against unreachable code warnings > anyway. Meh. I'm unexcited about getting rid of one type of compiler warning by introducing another one. regards, tom lane