git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb599b9)
Remove redundant check for default collation.
2024年9月12日 20:35:49 +0000 (13:35 -0700)
2024年9月12日 20:35:49 +0000 (13:35 -0700)
The operative check is for a deterministic collation, so the check for
DEFAULT_COLLATION is redundant. Furthermore, it will be wrong if we
ever support a non-deterministic default collation.

Author: Andreas Karlsson
Discussion: https://postgr.es/m/60929555-4709-40a7-b136-bcb44cff5a3c@proxel.se


diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 18629438881734cc9bc1a16e2db6dad231a176b2..3658d0047b0bdcc1178b7a465ce9457dfec56581 100644 (file)
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2540,7 +2540,6 @@ btvarstrequalimage(PG_FUNCTION_ARGS)
locale = pg_newlocale_from_collation(collid);
if (locale->collate_is_c ||
- collid == DEFAULT_COLLATION_OID ||
pg_locale_deterministic(locale))
PG_RETURN_BOOL(true);
else
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /