aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-07-13 14:16:47 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-07-13 14:16:54 -0400
commit4984784f836a061985b356c52253b5d83a0cbe65 (patch)
tree92a6418cf29efd0359493697fdb9c0ebb8ef0ab1 /src/backend/utils/adt/numeric.c
parent93ad00c968ae93e93f4ff238068a92625f41b6ff (diff)
downloadpostgresql-4984784f836a061985b356c52253b5d83a0cbe65.tar.gz
postgresql-4984784f836a061985b356c52253b5d83a0cbe65.zip
Fix crash in json{b}_populate_recordset() and json{b}_to_recordset().
As of commit 37a795a60, populate_recordset_worker() tried to pass back (as rsi.setDesc) a tupdesc that it also had cached in its fn_extra. But the core executor would free the passed-back tupdesc, risking a crash if the function were called again in the same query. The safest and least invasive way to fix that is to make an extra tupdesc copy to pass back. While at it, I failed to resist the temptation to get rid of unnecessary get_fn_expr_argtype() calls here and in populate_record_worker(). Per report from Dmitry Dolgov; thanks to Michael Paquier and Andrew Gierth for investigation and discussion. Discussion: https://postgr.es/m/CA+q6zcWzN9ztCfR47ZwgTr1KLnuO6BAY6FurxXhovP4hxr+yOQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions