Re: pgsql: ICU support

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: ICU support
Date: 2017-03-25 00:32:16
Message-ID: CAKJS1f8Qbmc8YvFOEgsxPWm0BcT4KCiCjnRqQcvaxME1Fuhz=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 24 March 2017 at 06:33, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> http://git.postgresql.org/pg/commitdiff/eccfef81e1f73ee41f1d8bfe4fa4e80576945048

[...]

> src/include/utils/pg_locale.h | 32 +-

I see this commit changed the definition of pg_locale_t

+struct pg_locale_t
+{
+ char provider;
+ union
+ {
#ifdef HAVE_LOCALE_T
-typedef locale_t pg_locale_t;
-#else
-typedef int pg_locale_t;
+ locale_t lt;
+#endif
+#ifdef USE_ICU
+ struct {
+ const char *locale;
+ UCollator *ucol;
+ } icu;
#endif
+ } info;
+};

but forgot to update varstr_cmp() completely.

result = wcscoll_l((LPWSTR) a1p, (LPWSTR) a2p, mylocale);

should be:

result = wcscoll_l((LPWSTR) a1p, (LPWSTR) a2p, mylocale->info.lt);

Patch attached.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
icu_fix.patch application/octet-stream 532 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-25 01:49:12 pgsql: Add more subscription DDL tests
Previous Message Alvaro Herrera 2017-03-24 20:21:41 pgsql: Fix typo in comment