Remove unnecessary check for NULL locale, per Coverity.

Discussion: https://postgr.es/m/3804933.1723394010@sss.pgh.pa.us
Reported-by: Tom Lane
pull/174/head
Jeff Davis 1 year ago
parent 1343ae954c
commit a459ac504c
  1. 2
      src/backend/utils/adt/like.c

@ -201,7 +201,7 @@ Generic_Text_IC_like(text *str, text *pat, Oid collation)
* way. * way.
*/ */
if (pg_database_encoding_max_length() > 1 || (locale && locale->provider == COLLPROVIDER_ICU)) if (pg_database_encoding_max_length() > 1 || (locale->provider == COLLPROVIDER_ICU))
{ {
pat = DatumGetTextPP(DirectFunctionCall1Coll(lower, collation, pat = DatumGetTextPP(DirectFunctionCall1Coll(lower, collation,
PointerGetDatum(pat))); PointerGetDatum(pat)));

Loading…
Cancel
Save