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 1n7feQ-0000t9-Ic for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jan 2022 15:35:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7feP-00009D-H3 for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Jan 2022 15:35:01 +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 1n7feP-00008k-97 for pgsql-bugs@lists.postgresql.org; Wed, 12 Jan 2022 15:35:01 +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 1n7feN-0000cN-8I for pgsql-bugs@lists.postgresql.org; Wed, 12 Jan 2022 15:35:00 +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 20CFYt3p2998708; Wed, 12 Jan 2022 10:34:55 -0500 From: Tom Lane To: elprans@gmail.com cc: Peter Eisentraut , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17363: 14 regression: "could not identify a hash function for type record" in a nested record in sublink In-reply-to: <17363-f6d42fd0d726be02@postgresql.org> References: <17363-f6d42fd0d726be02@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 11 Jan 2022 22:46:02 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2998706.1642001695.1@sss.pgh.pa.us> Date: Wed, 12 Jan 2022 10:34:55 -0500 Message-ID: <2998707.1642001695@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The following fails in PostgreSQL 14: > postgres14=# SELECT ROW(ROW(ROW(1))) = ANY (SELECT (ROW(ROW(ROW(1)))).*); > ERROR: could not identify a hash function for type record > whereas PostgreSQL 13 works fine: It appears that we're trying to use a hashed subplan for the =ANY, where v13 did not. So I'm inclined to blame this on 01e658fa7 (Hash support for row types). We backed off the optimism level a bit in a3d2b1bbe (Disable anonymous record hash support except in special cases), but evidently didn't go far enough; or else it's doing the wrong thing for nested RECORD types. regards, tom lane