Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwAja-0007al-MH for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jun 2021 21:48:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lwAjZ-0006F9-MF for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jun 2021 21:48:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwAjZ-0006F0-G2 for pgsql-bugs@lists.postgresql.org; Wed, 23 Jun 2021 21:48:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwAjT-0002f9-4T for pgsql-bugs@lists.postgresql.org; Wed, 23 Jun 2021 21:48:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15NLmPUT2450338; Wed, 23 Jun 2021 17:48:26 -0400 From: Tom Lane To: Tobias Wendorff cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17071: ORDER BY gets ignored when result set has only one row, but another one gets added by rollup() In-reply-to: <6574e1c6-fcb6-62fb-9de4-c9005feac87d@tu-dortmund.de> References: <17071-24dc13fbfa29672d@postgresql.org> <2350897.1624476008@sss.pgh.pa.us> <6574e1c6-fcb6-62fb-9de4-c9005feac87d@tu-dortmund.de> Comments: In-reply-to Tobias Wendorff message dated "Wed, 23 Jun 2021 21:40:26 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2450336.1624484905.1@sss.pgh.pa.us> Date: Wed, 23 Jun 2021 17:48:25 -0400 Message-ID: <2450337.1624484905@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tobias Wendorff writes: > To keep a long discussion short: you classify it as a wontfix. > Since I've already supplied a workaround (using a subquery or CTE), > let's close it. [ shrug... ] If you intend to take such a totally uncooperative approach, then I can't help you. I did *not* say this is a "wontfix". I said it's not easy to fix. There is a large difference. What I was wondering about was whether we could find an easier change that would help your actual use-case. But, since you're not seeing fit to provide further detail, you'll just have to wait till we can create a fix for the case as presented. That's likely to be a year or two down the pike. regards, tom lane