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 1mIX1g-0005Ry-W9 for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Aug 2021 14:03:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIX1f-0006WG-QY for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Aug 2021 14:03:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIX1f-0006V9-JT for pgsql-bugs@lists.postgresql.org; Tue, 24 Aug 2021 14:03:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIX1Z-0008KX-AZ for pgsql-bugs@lists.postgresql.org; Tue, 24 Aug 2021 14:03:39 +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 17OE3Qak333556; Tue, 24 Aug 2021 10:03:26 -0400 From: Tom Lane To: David Rowley cc: sait.nisanci@microsoft.com, PostgreSQL mailing lists , Peter Eisentraut Subject: Re: BUG #17158: Distinct ROW fails with Postgres 14 In-reply-to: References: <17158-8a2ba823982537a4@postgresql.org> Comments: In-reply-to David Rowley message dated "Tue, 24 Aug 2021 21:55:18 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <333554.1629813806.1@sss.pgh.pa.us> Date: Tue, 24 Aug 2021 10:03:26 -0400 Message-ID: <333555.1629813806@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > It looks like 01e658fa74 is to blame for this. > The test case can be simplified down to just: > create table local (b bit); > insert into local values('1'),('0'); > SELECT DISTINCT ROW(b) FROM local; > Tom did have a look at this and raise the question about the > possibility of not being able to hash in [1]. Huh. According to the thread, we discussed this exact possibility and there's a test case verifying it ... so apparently something got fat-fingered there. > If it's going to be a problem detecting the lack of hashability during > planning then maybe we can just add a hash opclass for BIT to fix this > particular case. Most certainly not. That would translate to a requirement that EVERY data type have a hash function. regards, tom lane