Re: BUG #17158: Distinct ROW fails with Postgres 14
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: David Rowley <dgrowleyml@gmail.com>, sait.nisanci@microsoft.com,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-08-31T20:43:54Z
Lists: pgsql-bugs
Peter Eisentraut <peter.eisentraut@enterprisedb.com> 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
Commits
-
Fix hash_array
- 9b2fd490577b 14.0 landed
- 851ff9335742 15.0 landed
-
Disable anonymous record hash support except in special cases
- 054adca641ac 14.0 landed
- a3d2b1bbe904 15.0 landed