diff options
author | Jeff Davis <jdavis@postgresql.org> | 2023-03-28 07:55:30 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2023-03-28 08:24:18 -0700 |
commit | 8b3eb0c584beabfc0deaad01aed66cbddb978dcd (patch) | |
tree | af9610d6eeb6822839db2c9844c183346f5e7fe0 /src/backend/commands/dbcommands.c | |
parent | 90189eefc1e11822794e3386d9bafafd3ba3a6e8 (diff) | |
download | postgresql-8b3eb0c584beabfc0deaad01aed66cbddb978dcd.tar.gz postgresql-8b3eb0c584beabfc0deaad01aed66cbddb978dcd.zip |
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
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions