Re: insensitive collations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: insensitive collations
Дата
Msg-id 9502.1545230159@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: insensitive collations  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: insensitive collations  (Peter Geoghegan <pg@bowt.ie>)
Re: insensitive collations  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
"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


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

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Re: GraalVM
Следующее
От: David Rowley
Дата:
Сообщение: Re: Some memory allocations in gin fastupdate code are a bit brain dead