pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().
Date: Tue, 06 Aug 2024 19:25:26 +0000
Message-ID: <E1sbPoE-0030g0-Pd@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1sbPoE-0030g0-Pd@gemulon.postgresql.org>
Permalink:  ../E1sbPoE-0030g0-Pd@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sbPoE-0030g0-Pd@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().
  In-Reply-To: <E1sbPoE-0030g0-Pd@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox