diff options
author | Jeff Davis <jdavis@postgresql.org> | 2024-09-12 13:35:56 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2024-09-12 13:35:56 -0700 |
commit | b0c30612c5f6ce519172396527781a0666937363 (patch) | |
tree | 73f869bbb84842d9286d784b98d3836a1de1f372 /src/backend/utils/adt/varchar.c | |
parent | 6a9fc11033e61d0dde30d5114887714dbd7612d5 (diff) |
Simplify checks for deterministic collations.
Remove redundant checks for locale->collate_is_c now that we always
have a valid pg_locale_t.
Also, remove pg_locale_deterministic() wrapper, which is no longer
useful after commit e9931bfb75. Just check the field directly,
consistent with other fields in pg_locale_t.
Author: Andreas Karlsson
Discussion: https://postgr.es/m/60929555-4709-40a7-b136-bcb44cff5a3c@proxel.se
Diffstat (limited to 'src/backend/utils/adt/varchar.c')
-rw-r--r-- | src/backend/utils/adt/varchar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index d2d1c5709d3..8f86aca2973 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -757,7 +757,7 @@ bpchareq(PG_FUNCTION_ARGS) mylocale = pg_newlocale_from_collation(collid); - if (mylocale->collate_is_c || pg_locale_deterministic(mylocale)) + if (mylocale->deterministic) { /* * Since we only care about equality or not-equality, we can avoid all @@ -798,7 +798,7 @@ bpcharne(PG_FUNCTION_ARGS) mylocale = pg_newlocale_from_collation(collid); - if (mylocale->collate_is_c || pg_locale_deterministic(mylocale)) + if (mylocale->deterministic) { /* * Since we only care about equality or not-equality, we can avoid all @@ -1005,7 +1005,7 @@ hashbpchar(PG_FUNCTION_ARGS) mylocale = pg_newlocale_from_collation(collid); - if (pg_locale_deterministic(mylocale)) + if (mylocale->deterministic) { result = hash_any((unsigned char *) keydata, keylen); } @@ -1061,7 +1061,7 @@ hashbpcharextended(PG_FUNCTION_ARGS) mylocale = pg_newlocale_from_collation(collid); - if (pg_locale_deterministic(mylocale)) + if (mylocale->deterministic) { result = hash_any_extended((unsigned char *) keydata, keylen, PG_GETARG_INT64(1)); |