pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm(). - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().
Date
Msg-id E1sbPoE-0030g0-Pd@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
selfuncs.c: use pg_strxfrm() instead of strxfrm().

pg_strxfrm() takes a pg_locale_t, so it works properly with all
providers. This improves estimates for ICU when performing linear
interpolation within a histogram bin.

Previously, convert_string_datum() always used strxfrm() and relied on
setlocale(). That did not produce good estimates for non-default or
non-libc collations.

Discussion: https://postgr.es/m/89475ee5487d795124f4e25118ea8f1853edb8cb.camel@j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a890ad214942c9eab1b2f0c6997e7dc114f99e71

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 23 ++++++++++++++++-------
src/backend/utils/adt/selfuncs.c  | 13 +++++++++----
2 files changed, 25 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix datatypes in comments in instr_time.h
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Use psprintf to simplify gtsvectorout()