postgresql/src
Alexander Korotkov 3218ff5c6a 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.

Original patch was written by Nikita Glukhov, rewritten by me.

Reported-by: Markus Winand
Discussion: https://postgr.es/m/8B7FA3B4-328D-43D7-95A8-37B8891B8C78%40winand.at
Author: Nikita Glukhov, Alexander Korotkov
Backpatch-through: 12
2019-08-11 22:55:21 +03:00
..
backend Adjust string comparison in jsonpath 2019-08-11 22:55:21 +03:00
bin Translation updates 2019-08-05 15:54:23 +02:00
common In pg_log_generic(), be more paranoid about preserving errno. 2019-07-06 11:25:48 -04:00
fe_utils Update stale comments, and fix comment typos. 2019-06-08 10:12:26 -07:00
include Stamp 12beta3. 2019-08-05 17:10:44 -04:00
interfaces Translation updates 2019-08-05 15:54:23 +02:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:39 -07:00
pl Translation updates 2019-08-05 15:54:23 +02:00
port Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Adjust string comparison in jsonpath 2019-08-11 22:55:21 +03:00
timezone Tweak our special-case logic for the IANA "Factory" timezone. 2019-07-26 13:07:08 -04:00
tools Fix syntax error in commit 20e99cddd. 2019-07-25 14:42:08 -04:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00