Re: Built-in CTYPE provider

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Built-in CTYPE provider
Date: 2024-07-09 08:00:24
Message-ID: af82b292f13dd234790bc701933e9992ee07d4fa.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2024-07-08 at 18:05 -0700, Noah Misch wrote:
> > I do not think it is realistic to define "IMMUTABLE" as meaning that
> > the function will never change behavior until the heat death of the
> > universe.  As a counterexample, we've not worried about applying
> > bug fixes or algorithm improvements that change the behavior of
> > "immutable" numeric computations.
>
> True.  There's a continuum from "releases can change any IMMUTABLE function"
> to "index integrity always wins, even if a function is as wrong as 1+1=3".
> I'm less concerned about the recent "Incorrect results from numeric round"
> thread, even though it's proposing to back-patch.  I'm thinking about these
> aggravating factors for $SUBJECT:
>
> - $SUBJECT is planning an annual cadence of this kind of change.
>
> - We already have ICU providing collation support for the same functions.
>   Unlike $SUBJECT, ICU integration gives packagers control over when to accept
>   corruption at pg_upgrade time.
>
> - SQL Server, DB2 and Oracle do their Unicode updates in a non-corrupting way.
>   (See Jeremy Schneider's reply concerning DB2 and Oracle.)
>
> - lower() and regexp are more popular in index expressions than
>   high-digit-count numeric calculations.

My personal exprience is that very few users are aware of or care about
the strict accuracy of the collation sort order and other locale aspects.
But they care a lot about index corruption.

So I'd argue that we should not have any breaking changes at all, even in
cases where the provider is clearly wrong.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emanuel Calvo 2024-07-09 08:01:03 Re: [PATCH] TODO “Allow LISTEN on patterns”
Previous Message Michael Paquier 2024-07-09 07:46:23 Missing installation of Kerberos.pm and AdjustUpgrade.pm