postgresql/src/backend
Peter Eisentraut b99ccd2cb2 Call pg_newlocale_from_collation() also with default collation
Previously, callers of pg_newlocale_from_collation() did not call it
if the collation was DEFAULT_COLLATION_OID and instead proceeded with
a pg_locale_t of 0.  Instead, now we call it anyway and have it return
0 if the default collation was passed.  It already did this, so we
just have to adjust the callers.  This simplifies all the call sites
and also makes future enhancements easier.

After discussion and testing, the previous comment in pg_locale.c
about avoiding this for performance reasons may have been mistaken
since it was testing a very different patch version way back when.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://www.postgresql.org/message-id/ed3baa81-7fac-7788-cc12-41e3f7917e34@enterprisedb.com
2022-01-20 09:50:18 +01:00
..
access Call pg_newlocale_from_collation() also with default collation 2022-01-20 09:50:18 +01:00
bootstrap pg_upgrade: Preserve relfilenodes and tablespace OIDs. 2022-01-17 13:40:27 -05:00
catalog pg_upgrade: Preserve relfilenodes and tablespace OIDs. 2022-01-17 13:40:27 -05:00
commands Remove redundant memory context switches in BeginCopyFrom(). 2022-01-19 12:31:15 -05:00
executor Fix memory leak in indexUnchanged hint mechanism. 2022-01-12 15:41:04 -08:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Update copyright for 2022 2022-01-07 19:04:57 -05:00
lib Update copyright for 2022 2022-01-07 19:04:57 -05:00
libpq Improve error handling of HMAC computations 2022-01-13 16:17:21 +09:00
main Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes Fix for new Boolean node 2022-01-17 13:59:46 +01:00
optimizer Teach hash_ok_operator() that record_eq is only sometimes hashable. 2022-01-16 16:39:26 -05:00
parser Add Boolean node 2022-01-17 10:38:23 +01:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
po Translation updates 2021-06-21 12:33:50 +02:00
port Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Introduce log_destination=jsonlog 2022-01-17 10:16:53 +09:00
regex Call pg_newlocale_from_collation() also with default collation 2022-01-20 09:50:18 +01:00
replication Make logical decoding a part of the rmgr. 2022-01-19 14:58:49 -08:00
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Add stxdinherit flag to pg_statistic_ext_data 2022-01-16 13:38:01 +01:00
storage Consistently use the function name CreateCheckPoint in code and comments. 2022-01-17 07:50:00 +05:30
tcop Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils Call pg_newlocale_from_collation() also with default collation 2022-01-20 09:50:18 +01:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Report progress of startup operations that take a long time. 2021-10-25 11:51:57 -04:00