aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-12-02 15:02:43 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-12-02 15:02:43 -0500
commit8571ecb24f57a3aefc412eaf775423f9e456e47f (patch)
tree2a6e82b8ce1959ad9624b88ebfb9406c3ae687cc /src/backend/executor
parent10b81fbdc56aecb07c7cfaa1a70da8c1ad70b37d (diff)
downloadpostgresql-8571ecb24f57a3aefc412eaf775423f9e456e47f.tar.gz
postgresql-8571ecb24f57a3aefc412eaf775423f9e456e47f.zip
Fix JSON aggregates to work properly when final function is re-executed.
Davide S. reported that json_agg() sometimes produced multiple trailing right brackets. This turns out to be because json_agg_finalfn() attaches the final right bracket, and was doing so by modifying the aggregate state in-place. That's verboten, though unfortunately it seems there's no way for nodeAgg.c to check for such mistakes. Fix that back to 9.3 where the broken code was introduced. In 9.4 and HEAD, likewise fix json_object_agg(), which had copied the erroneous logic. Make some cosmetic cleanups as well.
Diffstat (limited to 'src/backend/executor')
0 files changed, 0 insertions, 0 deletions