Re: BUG #17158: Distinct ROW fails with Postgres 14 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17158: Distinct ROW fails with Postgres 14
Date
Msg-id 2021952.1630442634@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17158: Distinct ROW fails with Postgres 14  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: BUG #17158: Distinct ROW fails with Postgres 14  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List 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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17170: Invalid collation created with provider icu and initdb' locale C
Next
From: PG Bug reporting form
Date:
Subject: BUG #17172: NaN compare error in hash agg