pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Adjust string comparison in jsonpath
Date: Sun, 11 Aug 2019 17:03:50 -0400
Message-ID: <0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com> (raw)
In-Reply-To: <E1hwuAz-0003Sr-SZ@gemulon.postgresql.org>
References: <E1hwuAz-0003Sr-SZ@gemulon.postgresql.org>


On 8/11/19 4:10 PM, Alexander Korotkov wrote:
> Adjust string comparison in jsonpath
>
> We have implemented jsonpath string comparison using default database locale.
> However, standard requires us to compare Unicode codepoints.  This commit
> implements that, but for performance reasons we still use per-byte comparison
> for "==" operator.  Thus, for consistency other comparison operators do per-byte
> comparison if Unicode codepoints appear to be equal.
>
> In some edge cases, when same Unicode codepoints have different binary
> representations in database encoding, we diverge standard to achieve better
> performance of "==" operator.  In future to implement strict standard
> conformance, we can do normalization of input JSON strings.
>


This appears to have upset prion when testing on en_US.iso885915.


cheers


andrew





-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services






view thread (7+ messages)  latest in thread

Message-ID: <0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com>
Permalink:  ../0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com/
Also on:    postgresql.org/message-id/0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com, akorotkov@postgresql.org
  Subject: Re: pgsql: Adjust string comparison in jsonpath
  In-Reply-To: <0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com>
  References: <E1hwuAz-0003Sr-SZ@gemulon.postgresql.org> <0ed83a33-d900-466a-880a-70ef456c721f@2ndQuadrant.com>

* 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