pgsql: Fix broken hash function hashbpcharextended().

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix broken hash function hashbpcharextended().
Date: 2022-12-02 22:15:48
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix broken hash function hashbpcharextended().

Ignore trailing spaces for non-deterministic collations when
hashing.

The previous behavior could lead to tuples falling into the wrong
partitions when hash partitioning is combined with the BPCHAR type and
a non-deterministic collation. Fortunately, it did not affect hash
indexes, because hash indexes do not use extended hash functions.

Decline to backpatch, per discussion.

Discussion: https://postgr.es/m/[email protected]
Reviewed-by: Richard Guo, Tom Lane

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ac0f8d384a4633c6652ae1f6bba40d42d21ec18

Modified Files
--------------
src/backend/utils/adt/varchar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-12-03 03:04:47 pgsql: Prevent pgstats from getting confused when relkind of a relation
Previous Message Jeff Davis 2022-12-02 21:55:41 Re: pgsql: Doc: document bpchar, clarify relationship of text and varchar.