Thread: pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().

pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().

From
Jeff Davis
Date:
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(-)