diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-06-21 10:58:42 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-06-21 10:58:42 -0400 |
commit | a4c95b0b80c70677c09c0d5c82a6fba875160288 (patch) | |
tree | 045106bd4886dc6f125b49debaca210351bfcb46 /src/backend/utils/adt/numeric.c | |
parent | 04ab840b8458e824a55fca10772ca9db39ab014c (diff) | |
download | postgresql-a4c95b0b80c70677c09c0d5c82a6fba875160288.tar.gz postgresql-a4c95b0b80c70677c09c0d5c82a6fba875160288.zip |
Fix mishandling of sortgroupref labels while splitting SRF targetlists.
split_pathtarget_at_srfs() neglected to worry about sortgroupref labels
in the intermediate PathTargets it constructs. I think we'd supposed
that their labeling didn't matter, but it does at least for the case that
GroupAggregate/GatherMerge nodes appear immediately under the ProjectSet
step(s). This results in "ERROR: ORDER/GROUP BY expression not found in
targetlist" during create_plan(), as reported by Rajkumar Raghuwanshi.
To fix, make this logic track the sortgroupref labeling of expressions,
not just their contents. This also restores the pre-v10 behavior that
separate GROUP BY expressions will be kept distinct even if they are
textually equal().
Discussion: https://postgr.es/m/CAKcux6=1_Ye9kx8YLBPmJs_xE72PPc6vNi5q2AOHowMaCWjJ2w@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions