From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: insensitive collations
Date: Wed, 19 Dec 2018 09:35:59 -0500
Message-ID: <9502.1545230159@sss.pgh.pa.us> (raw)
In-Reply-To: <39af4787-8042-4891-887c-3283488735db@manitou-mail.org>
References: <39af4787-8042-4891-887c-3283488735db@manitou-mail.org>
"Daniel Verite" <daniel@manitou-mail.org> writes:
> 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
I don't really find it "natural" for equality to consider obviously
distinct values to be equal. As a counterexample, the fact that IEEE
arithmetic treats 0 and -0 as equal seems to cause about as many problems
as it solves, and newcomers to float math certainly don't find it
"natural". So I object to that particular naming. Perhaps we could
do something around "uniqueness"? That is, collations could have
a boolean property UNIQUE, default true, or something like that.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, daniel@manitou-mail.org, peter.eisentraut@2ndquadrant.com
Subject: Re: insensitive collations
In-Reply-To: <9502.1545230159@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox