@@ -1223,7 +1223,7 @@ text_position_setup(text *t1, text *t2, Oid collid, TextPositionState *state)
1223
1223
1224
1224
mylocale = pg_newlocale_from_collation (collid );
1225
1225
1226
- if (!pg_locale_deterministic ( mylocale ) )
1226
+ if (!mylocale -> deterministic )
1227
1227
ereport (ERROR ,
1228
1228
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
1229
1229
errmsg ("nondeterministic collations are not supported for substring searches" )));
@@ -1567,7 +1567,7 @@ varstr_cmp(const char *arg1, int len1, const char *arg2, int len2, Oid collid)
1567
1567
result = pg_strncoll (arg1 , len1 , arg2 , len2 , mylocale );
1568
1568
1569
1569
/* Break tie if necessary. */
1570
- if (result == 0 && pg_locale_deterministic ( mylocale ) )
1570
+ if (result == 0 && mylocale -> deterministic )
1571
1571
{
1572
1572
result = memcmp (arg1 , arg2 , Min (len1 , len2 ));
1573
1573
if ((result == 0 ) && (len1 != len2 ))
@@ -1618,7 +1618,7 @@ texteq(PG_FUNCTION_ARGS)
1618
1618
1619
1619
mylocale = pg_newlocale_from_collation (collid );
1620
1620
1621
- if (pg_locale_deterministic ( mylocale ) )
1621
+ if (mylocale -> deterministic )
1622
1622
{
1623
1623
Datum arg1 = PG_GETARG_DATUM (0 );
1624
1624
Datum arg2 = PG_GETARG_DATUM (1 );
@@ -1673,7 +1673,7 @@ textne(PG_FUNCTION_ARGS)
1673
1673
1674
1674
mylocale = pg_newlocale_from_collation (collid );
1675
1675
1676
- if (pg_locale_deterministic ( mylocale ) )
1676
+ if (mylocale -> deterministic )
1677
1677
{
1678
1678
Datum arg1 = PG_GETARG_DATUM (0 );
1679
1679
Datum arg2 = PG_GETARG_DATUM (1 );
@@ -1786,7 +1786,7 @@ text_starts_with(PG_FUNCTION_ARGS)
1786
1786
1787
1787
mylocale = pg_newlocale_from_collation (collid );
1788
1788
1789
- if (!pg_locale_deterministic ( mylocale ) )
1789
+ if (!mylocale -> deterministic )
1790
1790
ereport (ERROR ,
1791
1791
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
1792
1792
errmsg ("nondeterministic collations are not supported for substring searches" )));
@@ -2200,7 +2200,7 @@ varstrfastcmp_locale(char *a1p, int len1, char *a2p, int len2, SortSupport ssup)
2200
2200
result = pg_strcoll (sss -> buf1 , sss -> buf2 , sss -> locale );
2201
2201
2202
2202
/* Break tie if necessary. */
2203
- if (result == 0 && pg_locale_deterministic ( sss -> locale ) )
2203
+ if (result == 0 && sss -> locale -> deterministic )
2204
2204
result = strcmp (sss -> buf1 , sss -> buf2 );
2205
2205
2206
2206
/* Cache result, perhaps saving an expensive strcoll() call next time */
@@ -2539,11 +2539,7 @@ btvarstrequalimage(PG_FUNCTION_ARGS)
2539
2539
2540
2540
locale = pg_newlocale_from_collation (collid );
2541
2541
2542
- if (locale -> collate_is_c ||
2543
- pg_locale_deterministic (locale ))
2544
- PG_RETURN_BOOL (true);
2545
- else
2546
- PG_RETURN_BOOL (false);
2542
+ PG_RETURN_BOOL (locale -> deterministic );
2547
2543
}
2548
2544
2549
2545
Datum
0 commit comments