Re: insensitive collations - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: insensitive collations
Date
Msg-id 39af4787-8042-4891-887c-3283488735db@manitou-mail.org
Whole thread Raw
In response to insensitive collations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: insensitive collations  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: Conflict handling for COPY FROM
Next
From: David Rowley
Date:
Subject: Re: Ordered Partitioned Table Scans