diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-02 23:31:39 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-02 23:31:39 -0500 |
commit | 429d6846572fe43dc11496adfeaecadf23925e3f (patch) | |
tree | 6c5fbe751a1f68d5eac717e5b457a986ae6dbce8 /src/backend/access/transam/commit_ts.c | |
parent | ca778d01e7f0f216bf2a8b0f45952c4c3ef5321a (diff) | |
download | postgresql-429d6846572fe43dc11496adfeaecadf23925e3f.tar.gz postgresql-429d6846572fe43dc11496adfeaecadf23925e3f.zip |
Fix json_to_record() bug with nested objects.
A thinko concerning nesting depth caused json_to_record() to produce bogus
output if a field of its input object contained a sub-object with a field
name matching one of the requested output column names. Per bug #13996
from Johann Visagie.
I added a regression test case based on his example, plus parallel tests
for json_to_recordset, jsonb_to_record, jsonb_to_recordset. The latter
three do not exhibit the same bug (which suggests that we may be missing
some opportunities to share code...) but testing seems like a good idea
in any case.
Back-patch to 9.4 where these functions were introduced.
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions