postgresql/src/backend
Tom Lane a331512dec Fix handling of nested JSON objects in json_populate_recordset and friends.
populate_recordset_object_start() improperly created a new hash table
(overwriting the link to the existing one) if called at nest levels
greater than one.  This resulted in previous fields not appearing in
the final output, as reported by Matti Hameister in bug #10728.
In 9.4 the problem also affects json_to_recordset.

This perhaps missed detection earlier because the default behavior is to
throw an error for nested objects: you have to pass use_json_as_text = true
to see the problem.

In addition, fix query-lifespan leakage of the hashtable created by
json_populate_record().  This is pretty much the same problem recently
fixed in dblink: creating an intended-to-be-temporary context underneath
the executor's per-tuple context isn't enough to make it go away at the
end of the tuple cycle, because MemoryContextReset is not
MemoryContextResetAndDeleteChildren.

Michael Paquier and Tom Lane
2014-06-24 21:22:43 -07:00
..
access Consistency improvements for slot and decoding code. 2014-06-12 13:29:19 +02:00
bootstrap Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
catalog Consistently spell a replication slot's name as slot_name. 2014-06-05 16:29:20 +02:00
commands Don't allow foreign tables with OIDs. 2014-06-24 13:31:06 +03:00
executor Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:13:44 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Rename lo_create(oid, bytea) to lo_from_bytea(). 2014-06-12 15:39:16 -04:00
main Make fallback implementation of pg_memory_barrier() work. 2014-05-17 18:29:46 -04:00
nodes pgindent run for 9.4 2014-05-06 12:12:18 -04:00
optimizer Revert "Auto-tune effective_cache size to be 4x shared buffers" 2014-05-08 20:49:38 -04:00
parser Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
po Translation updates 2014-05-10 22:16:59 -04:00
port Fix weird spacing in error message. 2014-06-18 15:44:38 -04:00
postmaster Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown. 2014-06-04 12:09:45 +09:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Consistency improvements for slot and decoding code. 2014-06-12 13:29:19 +02:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball Fix ancient encoding error in hungarian.stop. 2014-06-10 22:48:31 -04:00
storage Add defenses against running with a wrong selection of LOBLKSIZE. 2014-06-05 11:31:06 -04:00
tcop Set the process latch when processing recovery conflict interrupts. 2014-06-03 14:02:54 +02:00
tsearch pgindent run for 9.4 2014-05-06 12:12:18 -04:00
utils Fix handling of nested JSON objects in json_populate_recordset and friends. 2014-06-24 21:22:43 -07:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00