postgresql/src/backend
Tom Lane b23af45875 Fix erroneous hash calculations in gin_extract_jsonb_path().
The jsonb_path_ops code calculated hash values inconsistently in some cases
involving nested arrays and objects.  This would result in queries possibly
not finding entries that they should find, when using a jsonb_path_ops GIN
index for the search.  The problem cases involve JSONB values that contain
both scalars and sub-objects at the same nesting level, for example an
array containing both scalars and sub-arrays.  To fix, reset the current
stack->hash after processing each value or sub-object, not before; and
don't try to be cute about the outermost level's initial hash.

Correcting this means that existing jsonb_path_ops indexes may now be
inconsistent with the new hash calculation code.  The symptom is the same
--- searches not finding entries they should find --- but the specific
rows affected are likely to be different.  Users will need to REINDEX
jsonb_path_ops indexes to make sure that all searches work as expected.

Per bug #13756 from Daniel Cheng.  Back-patch to 9.4 where the faulty
logic was introduced.
2015-11-05 18:15:48 -05:00
..
access Pass extra data to bgworkers, and use this to fix parallel contexts. 2015-11-05 12:13:56 -05:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Message style improvements 2015-10-28 20:38:36 -04:00
commands Update spelling of COPY options 2015-11-04 21:01:26 -05:00
executor Fix problems with ParamListInfo serialization mechanism. 2015-11-02 18:11:29 -05:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib Avoid use of float arithmetic in bipartite_match.c. 2015-08-23 13:02:18 -04:00
libpq Don't send protocol messages to a shm_mq that no longer exists. 2015-10-16 09:42:33 -04:00
main Revoke support for strxfrm() that write past the specified array length. 2015-07-08 20:44:21 -04:00
nodes Fix problems with ParamListInfo serialization mechanism. 2015-11-02 18:11:29 -05:00
optimizer Improve implementation of GEQO's init_tour() function. 2015-11-05 10:46:14 -05:00
parser Message style improvements 2015-10-28 20:38:36 -04:00
po Translation updates 2015-06-28 23:56:55 -04:00
port On Windows, ensure shared memory handle gets closed if not being used. 2015-10-13 11:21:33 -04:00
postmaster Pass extra data to bgworkers, and use this to fix parallel contexts. 2015-11-05 12:13:56 -05:00
regex Implement lookbehind constraints in our regular-expression engine. 2015-10-30 19:14:19 -04:00
replication Message style improvements 2015-10-28 20:38:36 -04:00
rewrite Apply SELECT policies in INSERT/UPDATE+RETURNING 2015-10-05 07:55:13 -04:00
snowball Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
storage shm_mq: Third attempt at fixing nowait behavior in shm_mq_receive. 2015-11-03 09:12:52 -05:00
tcop Fix problems with ParamListInfo serialization mechanism. 2015-11-02 18:11:29 -05:00
tsearch pgindent run for 9.5 2015-05-23 21:35:49 -04:00
utils Fix erroneous hash calculations in gin_extract_jsonb_path(). 2015-11-05 18:15:48 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Revert "Have dtrace depend on object files directly, not objfiles.txt" 2015-10-15 13:16:03 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00