Re: [19] Proposal: function markers to indicate collation/ctype sensitivity - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: [19] Proposal: function markers to indicate collation/ctype sensitivity
Date
Msg-id 35687c56436bf37a987b51dfba59d2e8c35024f0.camel@j-davis.com
Whole thread Raw
In response to Re: [19] Proposal: function markers to indicate collation/ctype sensitivity  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On Wed, 2025-06-11 at 09:06 +0200, Peter Eisentraut wrote:
> >    CASE: lower/upper/initcap/fold behavior
> >    CLASS: char classifications such as [[:punct:]]
> >    ORDER: comparisons
> >
> > Internally, at least for the foreseeable future, CASE and CLASS
> > would
> > be the same. They'd just be different markers to record the user's
> > intent.
>
> Under what scenario would they become different, and how would that
> matter in practice?

I can't think of any reason those behaviors should diverge. If nothing
else, the "uppercase" property should be consistent with the results of
case mapping.

However, I have struggled to come up with a single word that includes
both casing behavior and character classification, but excludes
ordering behavior. Such a word would be useful for documentation, too.
I guess "CTYPE" works, but it's too technical and feels libc-specific.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Question on error code selection in conflict detection
Next
From: Peter Geoghegan
Date:
Subject: Removing BTScanPosUnpinIfPinned idiom from nbtree, simplifying mark/restore support