postgresql/src/include/utils
Andrew Dunstan 9b74f32cdb Unpack jbvBinary objects passed to pushJsonbValue
pushJsonbValue was accepting jbvBinary objects passed as WJB_ELEM or
WJB_VALUE data. While this succeeded, when those objects were later
encountered in attempting to convert the result to Jsonb, errors
occurred. With this change we ghuarantee that a JSonbValue constructed
from calls to pushJsonbValue does not contain any jbvBinary objects.
This cures a problem observed with jsonb_delete.

This means callers of pushJsonbValue no longer need to perform this
unpacking themselves. A subsequent patch will perform some cleanup in
that area.

The error was not triggered by any 9.4 code, but this is a publicly
visible routine, and so the error could be exercised by third party
code, therefore backpatch to 9.4.

Bug report from Peter Geoghegan, fix by me.
2015-05-22 10:31:29 -04:00
..
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
acl.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
array.h Add a cardinality function for arrays. 2014-01-21 12:38:53 -05:00
ascii.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
attoptcache.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
builtins.h Improve performance of EXPLAIN with large range tables. 2015-01-15 13:18:16 -05:00
bytea.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
cash.h Add casts from int4 and int8 to numeric. 2011-04-05 09:35:43 -04:00
catcache.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
combocid.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
date.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
datetime.h Support timezone abbreviations that sometimes change. 2014-10-16 15:22:13 -04:00
datum.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
dynahash.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
dynamic_loader.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
elog.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
evtcache.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
fmgrtab.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
formatting.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
geo_decls.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
guc.h Move PG_AUTOCONF_FILENAME definition 2014-12-03 19:58:13 -05:00
guc_tables.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
help_config.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
hsearch.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
inet.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
int8.h Provide moving-aggregate support for a bunch of numerical aggregates. 2014-04-12 20:33:09 -04:00
inval.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
json.h Cleanup around json_to_record/json_to_recordset 2014-03-26 10:18:24 -04:00
jsonapi.h Fix hstore_to_json_loose's detection of valid JSON number values. 2014-12-01 11:40:30 -05:00
jsonb.h Unpack jbvBinary objects passed to pushJsonbValue 2015-05-22 10:31:29 -04:00
logtape.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
lsyscache.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
memdebug.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
memutils.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nabstime.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
numeric.h Introduce jsonb, a structured format for storing json. 2014-03-23 16:40:19 -04:00
palloc.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pg_crc.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pg_crc_tables.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pg_locale.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pg_lsn.h Add btree and hash opclasses for pg_lsn. 2014-06-04 20:45:56 -04:00
pg_lzcompress.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pg_rusage.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
plancache.h Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:06 -05:00
portal.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ps_status.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
rangetypes.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rbtree.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rel.h Move view reloptions into their own varlena struct 2014-07-14 17:24:40 -04:00
relcache.h Code review for recent changes in relcache.c. 2014-05-14 14:56:08 -04:00
relfilenodemap.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
relmapper.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
reltrigger.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
resowner.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
resowner_private.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
selfuncs.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snapmgr.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
snapshot.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sortsupport.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
spccache.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
syscache.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
timeout.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
timestamp.h Provide moving-aggregate support for a bunch of numerical aggregates. 2014-04-12 20:33:09 -04:00
tqual.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tuplesort.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tuplestore.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
typcache.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tzparser.h Support timezone abbreviations that sometimes change. 2014-10-16 15:22:13 -04:00
uuid.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
varbit.h Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:31 -05:00
xml.h Update copyright for 2014 2014-01-07 16:05:30 -05:00