Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings
От
Thomas Munro
Тема
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings
Дата
Msg-id
CAEepm=3BasPHs2T-np=OZJmJCraQh5_HbcGMdkqW8oha-51ThA@mail.gmail.com
Ответ на
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings (Peter Geoghegan)
Список
Дерево обсуждения
[HACKERS] strcmp() tie-breaker for identical ICU-collated strings Amit Khandekar <amitdkhan.pg@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Amit Khandekar <amitdkhan.pg@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Geoghegan <pg@bowt.ie>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings Amit Khandekar <amitdkhan.pg@gmail.com>
On Fri, Jun 2, 2017 at 9:27 AM, Peter Geoghegan wrote: > On Thu, Jun 1, 2017 at 2:24 PM, Thomas Munro > wrote: >> Why should ICU be any different than the system provider in this >> respect? In both cases, we have a two-level comparison: first we use >> the collation-aware comparison, and then as a tie breaker, we use a >> binary comparison. If we didn't do a binary comparison as a >> tie-breaker, wouldn't the result be logically incompatible with the = >> operator, which does a binary comparison? > > I agree with that assessment. I think you *could* make a logically consistent set of operations with no binary tie-breaker. = could be defined in terms of strcoll and hash could hash the output of strxfrm, but it it'd be impractical and slow. In order to take advantage of simple and fast = and hash, we go the other way and teach < and > about binary order. -- Thomas Munro http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Andres Freund
Дата: