From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, "Nasby, Jim" <nasbyj(at)amazon(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Collation version tracking for macOS |
Date: | 2022-11-18 19:16:33 |
Message-ID: | CA+hUKG+vYCP0PuBNnzKR49tvGEogc9YmXqhcB4h5y=AeNXozYQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Nov 19, 2022 at 7:38 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Tue, Nov 15, 2022 at 1:55 PM Jeff Davis <pgsql(at)j-davis(dot)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?
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2022-11-18 19:28:41 | Re: New docs chapter on Transaction Management and related changes |
Previous Message | Bruce Momjian | 2022-11-18 19:11:50 | Re: New docs chapter on Transaction Management and related changes |