Re: pgsql: Add standard collation UNICODE - Mailing list pgsql-committers

From Jeff Davis
Subject Re: pgsql: Add standard collation UNICODE
Date
Msg-id 0c6fa66f2753217d2a40480a96bd2ccf023536a1.camel@j-davis.com
Whole thread Raw
In response to Re: pgsql: Add standard collation UNICODE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Sat, 2023-03-11 at 15:47 -0500, Tom Lane wrote:
> In general, I see no good reason for our regression tests to be
> making
> assumptions about exactly how ICU's root locale behaves, so I'd
> suggest
> just lobotomizing this test case so it doesn't depend on upper/lower
> sort order.

[ Looks like Peter already found the answer, but I had some additional
commentary so I'll send this anyway. ]

Mystery solved: "und" was not a valid spelling of "root" until version
55. So it fell back to the default locale, which is sensitive to the
environment.

With this in mind, I think we should take the opposite lesson and keep
this test as-is. We don't have to promise the behavior in the docs, but
it did catch a real issue. In fact, it caught a dangerous issue,
because a change to lc_messages could cause a corrupt index.

I'd like to see if there's a way to reliably detect that a fallback to
the environment-sensitive default locale has happened, and throw an
error. I don't think that happens in versions 55 and later, but it
would be nice to have a test because earlier versions of ICU seem
dangerous to me.

Regards,
    Jeff Davis




pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix JSON error reporting for many cases of erroneous string valu
Next
From: Andres Freund
Date:
Subject: pgsql: meson: fix openssl detection issues in 6a30027