pgsql: Support language tags in older ICU versions (53 and earlier).

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Support language tags in older ICU versions (53 and earlier).
Date: 2023-03-21 23:12:46
Message-ID: E1pel9q-004jOQ-73@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Support language tags in older ICU versions (53 and earlier).

By calling uloc_canonicalize() before parsing the attributes, the
existing locale attribute parsing logic works on language tags as
well.

Fix a small memory leak, too.

Discussion: http://postgr.es/m/60da0cecfb512a78b8666b31631a636215d8ce73.camel@j-davis.com
Reviewed-by: Peter Eisentraut

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/869650fa86adf74fca7f566c9317f6310f8b400c

Modified Files
--------------
src/backend/commands/collationcmds.c | 8 ++---
src/backend/utils/adt/pg_locale.c | 41 ++++++++++++++++++++++----
src/test/regress/expected/collate.icu.utf8.out | 8 +++++
src/test/regress/sql/collate.icu.utf8.sql | 4 +++
4 files changed, 50 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-03-21 23:50:22 pgsql: Fix a couple of typos
Previous Message Michael Paquier 2023-03-21 22:51:55 pgsql: Fix make maintainer-clean with queryjumblefuncs.*.c files in src