@@ -1223,7 +1223,7 @@ text_position_setup(text *t1, text *t2, Oid collid, TextPositionState *state)
12231223
12241224 mylocale = pg_newlocale_from_collation (collid );
12251225
1226- if (!pg_locale_deterministic ( mylocale ) )
1226+ if (!mylocale -> deterministic )
12271227 ereport (ERROR ,
12281228 (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
12291229 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)
15671567 result = pg_strncoll (arg1 , len1 , arg2 , len2 , mylocale );
15681568
15691569 /* Break tie if necessary. */
1570- if (result == 0 && pg_locale_deterministic ( mylocale ) )
1570+ if (result == 0 && mylocale -> deterministic )
15711571 {
15721572 result = memcmp (arg1 , arg2 , Min (len1 , len2 ));
15731573 if ((result == 0 ) && (len1 != len2 ))
@@ -1618,7 +1618,7 @@ texteq(PG_FUNCTION_ARGS)
16181618
16191619 mylocale = pg_newlocale_from_collation (collid );
16201620
1621- if (pg_locale_deterministic ( mylocale ) )
1621+ if (mylocale -> deterministic )
16221622 {
16231623 Datum arg1 = PG_GETARG_DATUM (0 );
16241624 Datum arg2 = PG_GETARG_DATUM (1 );
@@ -1673,7 +1673,7 @@ textne(PG_FUNCTION_ARGS)
16731673
16741674 mylocale = pg_newlocale_from_collation (collid );
16751675
1676- if (pg_locale_deterministic ( mylocale ) )
1676+ if (mylocale -> deterministic )
16771677 {
16781678 Datum arg1 = PG_GETARG_DATUM (0 );
16791679 Datum arg2 = PG_GETARG_DATUM (1 );
@@ -1786,7 +1786,7 @@ text_starts_with(PG_FUNCTION_ARGS)
17861786
17871787 mylocale = pg_newlocale_from_collation (collid );
17881788
1789- if (!pg_locale_deterministic ( mylocale ) )
1789+ if (!mylocale -> deterministic )
17901790 ereport (ERROR ,
17911791 (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
17921792 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)
22002200 result = pg_strcoll (sss -> buf1 , sss -> buf2 , sss -> locale );
22012201
22022202 /* Break tie if necessary. */
2203- if (result == 0 && pg_locale_deterministic ( sss -> locale ) )
2203+ if (result == 0 && sss -> locale -> deterministic )
22042204 result = strcmp (sss -> buf1 , sss -> buf2 );
22052205
22062206 /* Cache result, perhaps saving an expensive strcoll() call next time */
@@ -2539,11 +2539,7 @@ btvarstrequalimage(PG_FUNCTION_ARGS)
25392539
25402540 locale = pg_newlocale_from_collation (collid );
25412541
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 );
25472543}
25482544
25492545Datum
0 commit comments