Re: insensitive collations

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: insensitive collations
Дата
Msg-id CAH2-WznTeqBL=cX8_V2AaQFBoeiecMPcw__27oEXEb4J_vDuzw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: insensitive collations  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: insensitive collations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Dec 19, 2018 at 6:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I don't really find it "natural" for equality to consider obviously
> distinct values to be equal.

The Unicode consortium calls our current behavior within comparisons
"deterministic comparisons" -- it's something they're not so keen on:

https://unicode.org/reports/tr10/#Deterministic_Comparison

I suggest using their terminology for our current behavior. I can see
where Peter was coming from with "natural", but it doesn't quite work.
One problem with that terminology is that already refers to a sort
that sorts numbers as numbers. How about "linguistic", or "lexical"?

There is a significant cultural dimension to this. I suspect that you
don't find it "natural" that obviously distinct values compare as
equal because you're anglophone. That's the exact behavior you'll get
when using an unadorned en_US collation/locale, I think.

> 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.

FWIW, I don't think that your IEEE analogy quite works, because you're
talking about a property of a datatype. A collation is not intrinsic
to any collatable datatype. Fortunately, we're not required to agree
on what feels natural.

-- 
Peter Geoghegan


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_dumpall --exclude-database option
Следующее
От: Tom Lane
Дата:
Сообщение: Re: insensitive collations