aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-07-23 20:16:48 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-07-23 20:16:48 -0400
commit6d85bb1ba79c2792214df9fa17bcc8fac229c11c (patch)
tree5edf4478ca90ed05a7948c7971fae78ed9ffffac /src/backend/utils/adt/jsonfuncs.c
parent9d7abca901f855d96d823b6edb893b2b4ccf8c2f (diff)
downloadpostgresql-6d85bb1ba79c2792214df9fa17bcc8fac229c11c.tar.gz
postgresql-6d85bb1ba79c2792214df9fa17bcc8fac229c11c.zip
Correctly set up aggregate FILTER expression in partial-aggregation plans.
The aggfilter expression should be removed from the parent (combining) Aggref, since it's not supposed to apply the filter, and indeed cannot because any Vars used in the filter would not be available after the lower-level aggregation step. Per report from Jeff Janes. (This has been broken since the introduction of partial aggregation, I think. The error became obvious after commit 59a3795c2, when setrefs.c began processing the parent Aggref's fields normally and thus would detect such Vars. The special-case coding previously used in setrefs.c skipped over the parent's aggfilter field without processing it. That was broken in its own way because no other setrefs.c processing got applied either; though since the executor would not execute the filter expression, only initialize it, that oversight might not have had any visible symptoms at present.) Report: <CAMkU=1xfuPf2edAe4ZGXTmJpU7jxuKukKyvNtEXwu35B7dvejg@mail.gmail.com>
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions