Commit 524e0f7a authored by Peter Eisentraut's avatar Peter Eisentraut

Fix crash in ICU patch

This only happened with single-byte encodings.
parent c23b186a
......@@ -194,7 +194,7 @@ Generic_Text_IC_like(text *str, text *pat, Oid collation)
* long way.
*/
if (pg_database_encoding_max_length() > 1 || locale->provider == COLLPROVIDER_ICU)
if (pg_database_encoding_max_length() > 1 || (locale && locale->provider == COLLPROVIDER_ICU))
{
/* lower's result is never packed, so OK to use old macros here */
pat = DatumGetTextPP(DirectFunctionCall1Coll(lower, collation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment