Re: strcmp() tie-breaker for identical ICU-collated strings

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: strcmp() tie-breaker for identical ICU-collated strings
Date: 2017-06-01 21:27:08
Message-ID: CAH2-Wzm=7YmZQmGYq_e2JezY4JCtegvN9HZ4R2cF8T1wPHv4Gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 1, 2017 at 2:24 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> 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.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-06-01 21:41:25 Re: [PATCH] quiet conversion warning in DatumGetFloat4
Previous Message Thomas Munro 2017-06-01 21:24:53 Re: strcmp() tie-breaker for identical ICU-collated strings