postgresql/src/backend/utils/adt
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
..
acl.c Row-Level Security Policies (RLS) 2014-09-19 11:18:35 -04:00
array_selfuncs.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
array_typanalyze.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
array_userfuncs.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
arrayfuncs.c Silence compiler warning on Windows. 2014-09-11 13:50:14 +03:00
arrayutils.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ascii.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
bool.c Provide moving-aggregate support for boolean aggregates. 2014-04-13 00:01:46 -04:00
cash.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
char.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
date.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
datetime.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
datum.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
dbsize.c rename macro isTempOrToastNamespace to isTempOrTempToastNamespace 2014-08-25 21:28:19 -04:00
domains.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
encode.c Fix error hint style. 2014-07-09 11:34:47 -04:00
enum.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
float.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
format_type.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
formatting.c Revert f68dc5d86b 2014-09-12 20:42:19 -04:00
genfile.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
geo_ops.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
geo_selfuncs.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
inet_cidr_ntop.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
inet_net_pton.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
int8.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
int.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
json.c Revert 95d737ff to add 'ignore_nulls' 2014-09-29 13:32:22 -04:00
jsonb_gin.c Rename jsonb_hash_ops to jsonb_path_ops. 2014-05-11 12:06:04 -04:00
jsonb_op.c Fix bogus optimization in JSONB containment tests. 2014-10-11 14:13:51 -04:00
jsonb_util.c Fix bogus optimization in JSONB containment tests. 2014-10-11 14:13:51 -04:00
jsonb.c Change JSONB's on-disk format for improved performance. 2014-09-29 12:29:21 -04:00
jsonfuncs.c Fix corner-case behaviors in JSON/JSONB field extraction operators. 2014-08-22 13:17:58 -04:00
like_match.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
like.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
lockfuncs.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
mac.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
Makefile Add an in-core GiST index opclass for inet/cidr types. 2014-04-08 15:46:43 -04:00
misc.c Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
nabstime.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
name.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
network_gist.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
network_selfuncs.c Add an in-core GiST index opclass for inet/cidr types. 2014-04-08 15:46:43 -04:00
network.c Add min and max aggregates for inet/cidr data types. 2014-08-28 22:37:58 -04:00
numeric.c Fix power_var_int() for large integer exponents. 2014-09-11 23:30:51 -04:00
numutils.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
oid.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
oracle_compat.c Make sure chr(int) can't create invalid UTF8 sequences. 2014-05-16 16:51:28 -04:00
orderedsetaggs.c Don't cache per-group context across the whole query in orderedsetaggs.c. 2014-07-03 18:47:09 -04:00
pg_locale.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pg_lsn.c Add btree and hash opclasses for pg_lsn. 2014-06-04 20:45:56 -04:00
pg_lzcompress.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pgstatfuncs.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pseudotypes.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
quote.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
rangetypes_gist.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
rangetypes_selfuncs.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
rangetypes_spgist.c Fix bugs in SP-GiST search with range type's -|- (adjacent) operator. 2014-07-16 09:19:06 +03:00
rangetypes_typanalyze.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
rangetypes.c Fix bogus return macros in range_overright_internal(). 2014-08-16 13:48:39 -04:00
regexp.c Allow multibyte characters as escape in SIMILAR TO and SUBSTRING. 2014-08-27 21:07:36 -07:00
regproc.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ri_triggers.c Code review for row security. 2014-09-24 16:32:22 -04:00
rowtypes.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ruleutils.c Split builtins.h to a new header ruleutils.h 2014-10-08 18:10:47 -03:00
selfuncs.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tid.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
timestamp.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
trigfuncs.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsginidx.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tsgistidx.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsquery_cleanup.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsquery_gist.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsquery_op.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsquery_rewrite.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsquery_util.c Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:31 -05:00
tsquery.c Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:31 -05:00
tsrank.c Fix ts_rank_cd() to ignore stripped lexemes 2014-03-24 14:37:16 -04:00
tsvector_op.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsvector_parser.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tsvector.c Avoid memcpy() with same source and destination address. 2014-03-07 13:14:33 +02:00
txid.c Handle duplicate XIDs in txid_snapshot. 2014-05-15 18:29:20 +03:00
uuid.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
varbit.c Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:31 -05:00
varchar.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
varlena.c Add a fast pre-check for equality of equal-length strings. 2014-09-19 12:39:00 -04:00
version.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowfuncs.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
xid.c Implement mxid_age() to compute multi-xid age 2014-09-10 17:13:04 -04:00
xml.c Allow empty content in xml type 2014-09-09 11:34:52 -04:00