postgresql/src/backend
Alexander Korotkov d54ceb9e17 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:54:53 +03:00
..
access Fix predicate-locking of HOT updated rows. 2019-08-07 12:40:49 +03:00
bootstrap Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
catalog Require the schema qualification in pg_temp.type_name(arg). 2019-08-05 07:48:41 -07:00
commands Fix "ANALYZE t, t" inside a transaction block. 2019-08-10 11:30:11 -04:00
executor Fix choice of comparison operators for cross-type hashed subplans. 2019-08-05 11:20:31 -04:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Avoid macro clash with LLVM 9. 2019-07-29 10:23:55 +12:00
lib Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
libpq Refactor logic to remove trailing CR/LF characters from strings 2019-08-09 11:05:14 +09:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
optimizer Cosmetic improvements in setup of planner's per-RTE arrays. 2019-08-09 12:33:43 -04:00
parser Add comment on no default partition with hash partitioning 2019-08-07 12:27:47 -04:00
partitioning Fix SIGSEGV in pruning for ScalarArrayOp with constant-null array. 2019-08-09 13:20:28 -04:00
po Translation updates 2019-06-17 15:30:20 +02:00
port Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
postmaster Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
regex Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
replication Adjust tuple data lookup logic in multi-insert logical decoding 2019-08-07 10:28:16 +09:00
rewrite Make identity sequence management more robust 2019-07-22 12:07:10 +02:00
snowball Sync our Snowball stemmer dictionaries with current upstream 2019-07-04 13:26:48 +02:00
statistics Use column collation for extended statistics 2019-07-20 16:37:37 +02:00
storage Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
tcop Revert "Add log_statement_sample_rate parameter" 2019-08-04 23:38:27 +02:00
tsearch Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
utils Adjust string comparison in jsonpath 2019-08-11 22:54:53 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00