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: Fix error inconsistency in older ICU versions.
Date: Tue, 28 Mar 2023 15:25:11 +0000
Message-ID: <E1phBC9-000AYP-T6@gemulon.postgresql.org> (raw)

Fix error inconsistency in older ICU versions.

To support older ICU versions, we rely on
icu_set_collation_attributes() to do error checking that is handled
directly by ucol_open() in newer ICU versions. Commit 3b50275b12
introduced a slight inconsistency, where the error report includes the
fixed-up locale string, rather than the locale string passed to
pg_ucol_open().

Refactor slightly so that pg_ucol_open() handles the errors from both
ucol_open() and icu_set_collation_attributes(), making it easier to
see any differences between the error reports. It also makes
pg_ucol_open() responsible for closing the UCollator on error, which
seems like the right place.

Discussion: https://postgr.es/m/04182066-7655-344a-b8b7-040b1b2490fb%40enterprisedb.com
Reviewed-by: Peter Eisentraut

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b3eb0c584beabfc0deaad01aed66cbddb978dcd

Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 62 +++++++++++++++++++++------------------
1 file changed, 34 insertions(+), 28 deletions(-)



Message-ID: <E1phBC9-000AYP-T6@gemulon.postgresql.org>
Permalink:  ../E1phBC9-000AYP-T6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1phBC9-000AYP-T6@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: Fix error inconsistency in older ICU versions.
  In-Reply-To: <E1phBC9-000AYP-T6@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