Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 524e0f7

Browse files
committed
Fix crash in ICU patch
This only happened with single-byte encodings.
1 parent c23b186 commit 524e0f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/like.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Generic_Text_IC_like(text *str, text *pat, Oid collation)
194194
* long way.
195195
*/
196196

197-
if (pg_database_encoding_max_length() > 1 || locale->provider == COLLPROVIDER_ICU)
197+
if (pg_database_encoding_max_length() > 1 || (locale && locale->provider == COLLPROVIDER_ICU))
198198
{
199199
/* lower's result is never packed, so OK to use old macros here */
200200
pat = DatumGetTextPP(DirectFunctionCall1Coll(lower, collation,

0 commit comments

Comments
 (0)