postgresql/src/backend
Tom Lane 4a50de1312 Fix bogus optimization in JSONB containment tests.
When determining whether one JSONB object contains another, it's okay to
make a quick exit if the first object has fewer pairs than the second:
because we de-duplicate keys within objects, it is impossible that the
first object has all the keys the second does.  However, the code was
applying this rule to JSONB arrays as well, where it does *not* hold
because arrays can contain duplicate entries.  The test was really in
the wrong place anyway; we should do it within JsonbDeepContains, where
it can be applied to nested objects not only top-level ones.

Report and test cases by Alexander Korotkov; fix by Peter Geoghegan and
Tom Lane.
2014-10-11 14:13:51 -04:00
..
access Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
bootstrap Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
catalog Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
commands Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
executor Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
foreign Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Reorganize functions in be-secure-openssl.c 2014-08-18 13:12:40 +03:00
main Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
nodes Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
optimizer Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
parser Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
po Translation updates 2014-10-05 23:23:50 -04:00
port Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
postmaster Eliminate one background-worker-related flag variable. 2014-10-04 21:25:41 -04:00
regex Fix incorrect search for "x?" style matches in creviterdissect(). 2014-09-23 20:26:14 -04:00
replication Improve documentation about binary/textual output mode for output plugins. 2014-10-01 13:22:17 +02:00
rewrite Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
snowball Finish adding file version information to installed Windows binaries. 2014-08-18 22:59:53 -04:00
storage Extend shm_mq API with new functions shm_mq_sendv, shm_mq_set_handle. 2014-10-08 14:38:31 -04:00
tcop Log ALTER SYSTEM statements as DDL 2014-09-22 20:50:17 -04:00
tsearch pgindent run for 9.4 2014-05-06 12:12:18 -04:00
utils Fix bogus optimization in JSONB containment tests. 2014-10-11 14:13:51 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00