Remove unnecessary check for NULL locale, per Coverity.

Discussion: https://postgr.es/m/3804933.1723394010@sss.pgh.pa.us
Reported-by: Tom Lane
This commit is contained in:
Jeff Davis 2024-08-12 12:26:23 -07:00
parent 1343ae954c
commit a459ac504c

View File

@ -201,7 +201,7 @@ Generic_Text_IC_like(text *str, text *pat, Oid collation)
* 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,
PointerGetDatum(pat)));