Re: Support regular expressions with nondeterministic collations

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support regular expressions with nondeterministic collations
Date: 2024-10-29 08:47:30
Message-ID: aba93eda-6215-4bff-bab7-6e0656a028e9@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.10.24 16:40, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
>> This patch allows using regular expression functions and operators with
>> nondeterministic collations.
>> ...
>> In summary, this patch doesn't change any functionality that currently
>> works. It just removes one error message and lets regular expressions
>> just run, independent of whether the collation is nondeterministic.
>
> I kind of wonder if we really want to do this. It adds no
> functionality, and it forecloses the possibility of changing
> the definition later. I understand and agree with your conclusion
> that it's pretty much impossible to do what the SQL standard suggests
> should happen --- but maybe we're both missing something that would
> make it feasible. (Have you asked your committee colleagues if
> anyone's actually implemented what they wrote about SIMILAR TO?
> If they've written something unimplementable, it seems like there
> is work for them to do in any case.)

Good idea; I'll go ask there too.

Btw., one end goal here is to be able to run with a nondeterministic
collation as the global locale. So for example you could make the whole
system insensitive to Unicode normalization forms. But if that
effectively globally disables regular expressions, then people will be
sad, and also most of psql breaks, and so on. So some positive solution
here would be useful.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yushi Ogiwara 2024-10-29 09:00:24 Re: Fix for consume_xids advancing XIDs incorrectly
Previous Message Peter Eisentraut 2024-10-29 08:33:54 Re: -Wformat-signedness