Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ac0f8d

Browse files
committed
Fix broken hash function hashbpcharextended().
Ignore trailing spaces for non-deterministic collations whenhashing.The previous behavior could lead to tuples falling into the wrongpartitions when hash partitioning is combined with the BPCHAR type anda non-deterministic collation. Fortunately, it did not affect hashindexes, because hash indexes do not use extended hash functions.Decline to backpatch, per discussion.Discussion:https://postgr.es/m/eb83d0ac7b299eb08f9b900dd08a5a0c5d90e517.camel@j-davis.comReviewed-by: Richard Guo, Tom Lane
1 parent4c689a6 commit7ac0f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/varchar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ hashbpcharextended(PG_FUNCTION_ARGS)
10861086
Sizebsize;
10871087
uint8_t*buf;
10881088

1089-
ulen=icu_to_uchar(&uchar,VARDATA_ANY(key),VARSIZE_ANY_EXHDR(key));
1089+
ulen=icu_to_uchar(&uchar,keydata,keylen);
10901090

10911091
bsize=ucol_getSortKey(mylocale->info.icu.ucol,
10921092
uchar,ulen,NULL,0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp