Re: ICU integration

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Doug Doole <ddoole(at)salesforce(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ICU integration
Date: 2016-09-07 01:30:59
Message-ID: CAM3SWZTmycb-FVmi7Ld7u+VE1CL9+Ath5zgZf55NtGNfA_EQWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 6, 2016 at 10:40 AM, Doug Doole <ddoole(at)salesforce(dot)com> wrote:
>> The ICU ABI (not API) is also versioned. The way that this is done is
>> that all functions are actually macros to a versioned symbol. So
>> ucol_open() is actually a macro that expands to, say, ucol_open_57() in
>> ICU version 57. (They also got rid of a dot in their versions a while
>> ago.) It's basically hand-crafted symbol versioning. That way, you can
>> link with multiple versions of ICU at the same time. However, the
>> purpose of that, as I understand it, is so that plugins can have a
>> different version of ICU loaded than the main process or another plugin.
> > In terms of postgres using the right version of ICU, it doesn't buy
>> anything beyond what the soname mechanism does.
>
> You can access the versioned API as well, it's just not documented. (The ICU
> team does support this - we worked very closely with them when doing all
> this.) We exploited the versioned API when we learned that there is no
> guarantee of backwards compatibility in collations. You can't just change a
> collation under a user (at least that was our opinion) since it can cause
> all sorts of problems. Refreshing a collation (especially on the fly) is a
> lot more work than we were prepared to take on. So we exploited the
> versioned APIs.

I originally got some of this information from the ICU Doxygen site
for the C API, which isn't great documentation, but also isn't bad. I
admit that there are certainly gaps in my understanding of how to
bridge our requirements with versioning to what ICU can give us.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gerdan Rezende dos Santos 2016-09-07 01:37:47 Re: [PATCH] add option to pg_dumpall to exclude tables from the dump
Previous Message Peter Eisentraut 2016-09-07 00:56:23 Re: Logical Replication WIP