Re: insensitive collations

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Peter Eisentraut" <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: insensitive collations
Date: 2018-12-19 12:06:29
Message-ID: 39af4787-8042-4891-887c-3283488735db@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:

> So this doesn't actually make the collation case-insensitive or
> anything, it just allows a library-provided collation that is, say,
> case-insensitive to actually work that way.

That's great news!

> So maybe "insensitive" isn't the right name for this flag, but we
> can think about that.

To me it seems more natural to find a name for the other behavior, the
one that consists of overwriting the locale-sensitive equality with
the result of the byte-wise comparison. AFAIU the flag is meant
to say: "don't do that".

Some ideas that come to mind:

as an enum
CREATE COLLATION ... ( [EQUALITY = 'natural' | 'bytewise' ] )
as a boolean
CREATE COLLATION ... ( [NATURAL_EQUALITY = true | false ] )
defaulting to false
or
CREATE COLLATION ... ( [BYTEWISE_EQUALITY = true | false ] )
defaulting to true

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-12-19 12:17:58 Re: Ordered Partitioned Table Scans
Previous Message Surafel Temesgen 2018-12-19 11:48:14 Re: Conflict handling for COPY FROM