Re: Collation version tracking for macOS
От | Thomas Munro |
---|---|
Тема | Re: Collation version tracking for macOS |
Дата | |
Msg-id | CA+hUKG+vYCP0PuBNnzKR49tvGEogc9YmXqhcB4h5y=AeNXozYQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Collation version tracking for macOS (Thomas Munro <thomas.munro@gmail.com>) |
Список | pgsql-hackers |
On Sat, Nov 19, 2022 at 7:38 AM Thomas Munro <thomas.munro@gmail.com> wrote: > On Tue, Nov 15, 2022 at 1:55 PM Jeff Davis <pgsql@j-davis.com> wrote: > > I realize your patch is experimental, but when there is a better > > consensus on the approach, we should consider adding declarative syntax > > such as: > > > > CREATE COLLATION (or LOCALE?) PROVIDER icu67 > > TYPE icu VERSION '67' AS '/path/to/icui18n.so.67'; > > > > It will offer more opportunities to catch errors early and offer better > > error messages. It would also enable it to function if the library is > > built with --disable-renaming (though we'd have to trust the user). > > Earlier in this and other threads, we wondered if each ICU major version should > be a separate provider, which is what you're showing there, or should be an > independent property of an individual COLLATION, which is what v6 did with > '63:en' and what Peter suggested I make more formal with CREATE COLLATION foo > (..., ICU_VERSION=63). I actually started out thinking we'd have multiple > providers, but I couldn't really think of any advantage, and I think it makes > some upgrade scenarios more painful. Can you elaborate on why you'd want > that model? Hmm, thinking some more about this... I said the above thinking that you couldn't change a provider after creating a database/collation. But what if you could? 1. CREATE DATABASE x LOCALE_PROVIDER=icu ...; 2. Some time later after an upgrade, my postgres binary is linked against a new ICU version and I start seeing warnings. 3. ALTER DATABASE x LOCALE_PROVIDER=icu63; I suppose you shouldn't be allowed to change libc -> icu, but you could change icu - > icuXXX, or I guess icuXXX -> icuXXX. What if you didn't have to manually manage the set of available providers with DDL like you showed, but we just automatically supported "icu" (= the linked ICU, whatever it might be), and icu50 up to icuXXX where XXX is the linked ICU's version? We can encode those values + libc as an int, to replace the existing char the represents providers in catalogues. That's basically just a different way of encoding the same information that Peter was suggesting I put in a new catalogue attribute. How do you like that bikeshed colour?
В списке pgsql-hackers по дате отправления: