Content-Length: 258745 | pFad | http://github.com/postgrespro/postgres/commit/d57d61533a2b5b27b60cc9024c54688390871bf6

FA Add missing check_collation_set call to bpcharne(). · postgrespro/postgres@d57d615 · GitHub
Skip to content

Commit d57d615

Browse files
committed
Add missing check_collation_set call to bpcharne().
We should throw an error for indeterminate collation, but bpcharne() was missing that logic, resulting in a much less user-friendly error (either an assertion failure or "cache lookup failed for collation 0"). Per report from Manuel Rigger. Back-patch to v12 where the mistake came in, evidently in commit 5e1963f. (Before non-deterministic collations, this function wasn't collation sensitive.) Discussion: https://postgr.es/m/CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com
1 parent 0cafdd0 commit d57d615

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/utils/adt/varchar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,8 @@ bpcharne(PG_FUNCTION_ARGS)
784784
bool result;
785785
Oid collid = PG_GET_COLLATION();
786786

787+
check_collation_set(collid);
788+
787789
len1 = bcTruelen(arg1);
788790
len2 = bcTruelen(arg2);
789791

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/d57d61533a2b5b27b60cc9024c54688390871bf6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy