pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bug in support for collation attributes on older ICU version
Date: Tue, 19 Mar 2019 08:48:09 +0000
Message-ID: <E1h6APp-0004da-C1@gemulon.postgresql.org> (raw)

Fix bug in support for collation attributes on older ICU versions

Unrecognized attribute names are supposed to be ignored.  But the code
would error out on an unrecognized attribute value even if it did not
recognize the attribute name.  So unrecognized attributes wouldn't
really be ignored unless the value happened to be one that matched a
recognized value.  This would break some important cases where the
attribute would be processed by ucol_open() directly.  Fix that and
add a test case.

The restructured code should also avoid compiler warnings about
initializing a UColAttribute value to -1, because the type might be an
unsigned enum.  (reported by Andres Freund)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f050c08f91d866c560344d4510404ecd2763cbf

Modified Files
--------------
src/backend/utils/adt/pg_locale.c              | 10 ++++++----
src/test/regress/expected/collate.icu.utf8.out | 10 ++++++++++
src/test/regress/sql/collate.icu.utf8.sql      |  7 +++++++
3 files changed, 23 insertions(+), 4 deletions(-)



Message-ID: <E1h6APp-0004da-C1@gemulon.postgresql.org>
Permalink:  ../E1h6APp-0004da-C1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h6APp-0004da-C1@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Fix bug in support for collation attributes on older ICU version
  In-Reply-To: <E1h6APp-0004da-C1@gemulon.postgresql.org>
  References: <E1h6APp-0004da-C1@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