Re: [PG19] eager aggregation gives wrong results because of bpchar_ops - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PG19] eager aggregation gives wrong results because of bpchar_ops
Date
Msg-id 1356708.1791253792@sss.pgh.pa.us
Whole thread
In response to [PG19] eager aggregation gives wrong results because of bpchar_ops  (shihao zhong <zhong950419@gmail.com>)
Responses Re: [PG19] eager aggregation gives wrong results because of bpchar_ops
List pgsql-hackers
shihao zhong <zhong950419@gmail.com> writes:
> I used Opus to go over the new features in PG19, and it found wrong
> results from eager aggregation on a bpchar column with no length.
> ...
> bpchar equality ignores trailing spaces, but bpchar_ops and
> bpchar_pattern_ops have an equalimage function, and eager aggregation
> trusts it. nbtree deduplication does too, also on 18.

Yeah, this was also complained of just a little bit ago:

https://www.postgresql.org/message-id/19749-d46adf7c7d910b07%40postgresql.org

I can see no excuse for pretending bpchar comparison is bitwise.

> The patches follow the interval_ops fix [2]. 0001 drops support
> function 4 from both opclasses, catversion bump needed.

I'm inclined to use the newer patch in v19, rather than trusting
the runtime return-false method.

            regards, tom lane



pgsql-hackers by date:

Previous
From: shihao zhong
Date:
Subject: [PG19] eager aggregation gives wrong results because of bpchar_ops
Next
From: shihao zhong
Date:
Subject: Re: [PG19] eager aggregation gives wrong results because of bpchar_ops