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 1mLAbw-0001Zh-Ko for pgsql-bugs@arkaria.postgresql.org; Tue, 31 Aug 2021 20:44:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mLAbv-0001M3-L7 for pgsql-bugs@arkaria.postgresql.org; Tue, 31 Aug 2021 20:43:59 +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 1mLAbv-0001Lv-En for pgsql-bugs@lists.postgresql.org; Tue, 31 Aug 2021 20:43:59 +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 1mLAbt-0005W9-EV for pgsql-bugs@lists.postgresql.org; Tue, 31 Aug 2021 20:43:59 +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 17VKhs7c2021953; Tue, 31 Aug 2021 16:43:54 -0400 From: Tom Lane To: Peter Eisentraut cc: David Rowley , sait.nisanci@microsoft.com, PostgreSQL mailing lists Subject: Re: BUG #17158: Distinct ROW fails with Postgres 14 In-reply-to: References: <17158-8a2ba823982537a4@postgresql.org> <496046.1629843371@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Fri, 27 Aug 2021 12:36:04 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2021951.1630442634.1@sss.pgh.pa.us> Date: Tue, 31 Aug 2021 16:43:54 -0400 Message-ID: <2021952.1630442634@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > This feature is a requirement for multicolumn path and cycle tracking in > recursive queries, as well as the search/cycle syntax built on top of > that, so there is a bit more depending on it than might be at first > apparent. Hmm. > Variant 1 is that we let the type cache *not* report hash support for > the record type, and let callers fill it in. In the attached patch I've > only done this for hash_array(), because that's what's needed to get the > tests to pass, but similar code would be possible for row types, range > types, etc. > Variant 2 is that we let the type cache report hash support for the > record type, like now, and then let callers override it if they have > other options. This is the second attached patch. I find variant 1 a bit cleaner, and safer. I'd rather default to assuming that RECORD doesn't hash, when we don't have enough info to be sure. regards, tom lane