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 1gJSYo-0007fF-BJ for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Nov 2018 00:16:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJSYl-00037i-02 for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Nov 2018 00:16:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJSYk-00037b-Q0 for pgsql-bugs@lists.postgresql.org; Mon, 05 Nov 2018 00:16:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJSYe-0006rP-D2 for pgsql-bugs@postgresql.org; Mon, 05 Nov 2018 00:16:02 +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 wA50FlmZ025773; Sun, 4 Nov 2018 19:15:47 -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: <20181105000900.hmhvb5daedmxzm63@alap3.anarazel.de> References: <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> <24674.1541375380@sss.pgh.pa.us> <20181105000900.hmhvb5daedmxzm63@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 04 Nov 2018 16:09:00 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25771.1541376947.1@sss.pgh.pa.us> Date: Sun, 04 Nov 2018 19:15:47 -0500 Message-ID: <25772.1541376947@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 18:49:40 -0500, Tom Lane wrote: >> Meh. I'm unexcited about getting rid of one type of compiler warning by >> introducing another one. > It's impracticable to enable dead code warnings in postgres > anyway. There's way way too many of them (all the returns after > elog(ERROR) etc are enough to make it infeasible to change that). I think you have a very limited conception of what sorts of warnings code like that would trigger. In particular, even given the unsubstantiated assumption that nobody's compiler would complain, I think static analyzers like Coverity might. regards, tom lane