pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix mishandling of sortgroupref labels while splitting SRF targe 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix mishandling of sortgroupref labels while splitting SRF targe @ 2018-06-21 14:58 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2018-06-21 14:58 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a4c95b0b80c70677c09c0d5c82a6fba875160288 Modified Files -------------- src/backend/optimizer/util/tlist.c | 146 +++++++++++++++++++++++--- src/test/regress/expected/select_parallel.out | 62 +++++++++++ src/test/regress/sql/select_parallel.sql | 7 ++ 3 files changed, 198 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix mishandling of sortgroupref labels while splitting SRF targe @ 2018-06-21 14:58 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2018-06-21 14:58 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/07e5a213524853c06684155d4af5a0291d95d25a Modified Files -------------- src/backend/optimizer/util/tlist.c | 146 +++++++++++++++++++++++--- src/test/regress/expected/select_parallel.out | 62 +++++++++++ src/test/regress/sql/select_parallel.sql | 7 ++ 3 files changed, 198 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-06-21 14:58 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-06-21 14:58 pgsql: Fix mishandling of sortgroupref labels while splitting SRF targe Tom Lane <tgl@sss.pgh.pa.us> 2018-06-21 14:58 pgsql: Fix mishandling of sortgroupref labels while splitting SRF targe Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox