pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: ICU: do not convert locale 'C' to 'en-US-u-va-posix'.
2+ messages / 1 participants
[nested] [flat]

* pgsql: ICU: do not convert locale 'C' to 'en-US-u-va-posix'.
@ 2023-05-08 17:49  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2023-05-08 17:49 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ICU: do not convert locale 'C' to 'en-US-u-va-posix'.

The conversion was intended to be for convenience, but it's more
likely to be confusing than useful.

The user can still directly specify 'en-US-u-va-posix' if desired.

Discussion: https://postgr.es/m/f83f089ee1e9acd5dbbbf3353294d24e1f196e95.camel@j-davis.com
Discussion: https://postgr.es/m/37520ec1ae9591f83132f82dbd625f3fc2d69c16.camel@j-davis.com

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/pg_locale.c              | 19 +------------------
src/bin/initdb/initdb.c                        | 17 +----------------
src/test/regress/expected/collate.icu.utf8.out |  8 ++++++++
src/test/regress/sql/collate.icu.utf8.sql      |  4 ++++
4 files changed, 14 insertions(+), 34 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: ICU: do not convert locale 'C' to 'en-US-u-va-posix'.
@ 2023-06-21 21:13  Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2023-06-21 21:13 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ICU: do not convert locale 'C' to 'en-US-u-va-posix'.

Older versions of ICU canonicalize "C" to "en-US-u-va-posix"; but
starting in ICU version 64, the "C" locale is considered
obsolete. Postgres commit ea1db8ae70 introduced code to always
canonicalize "C" to "en-US-u-va-posix" for consistency and
convenience, but it was deemed too confusing.

This commit removes that code, so that "C" is treated like other ICU
locale names: canonicalization is attempted, and if it fails, the
behavior is controlled by icu_validation_level.

A similar change was previously committed as f7faa9976c, then reverted
due to an ICU-version-dependent test failure. This commit un-reverts
it, omitting the test because we now expect the behavior to depend on
the version of ICU being used.

Discussion: https://postgr.es/m/3a200aca-4672-4b37-fc91-5d198a323503%40eisentraut.org
Discussion: https://postgr.es/m/f83f089ee1e9acd5dbbbf3353294d24e1f196e95.camel@j-davis.com
Discussion: https://postgr.es/m/37520ec1ae9591f83132f82dbd625f3fc2d69c16.camel@j-davis.com

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/pg_locale.c              | 19 +------------------
src/bin/initdb/initdb.c                        | 17 +----------------
src/test/regress/expected/collate.icu.utf8.out |  2 ++
src/test/regress/sql/collate.icu.utf8.sql      |  2 ++
4 files changed, 6 insertions(+), 34 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-06-21 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 17:49 pgsql: ICU: do not convert locale 'C' to 'en-US-u-va-posix'. Jeff Davis <jdavis@postgresql.org>
2023-06-21 21:13 pgsql: ICU: do not convert locale 'C' to 'en-US-u-va-posix'. Jeff Davis <jdavis@postgresql.org>

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