pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs 6+ messages / 1 participants [nested] [flat]
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/79b58c6f684315d39dfdbd721da7576d90bd9f99 Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ac51c9fba5a796ff434c0a7e05a5fd081690b21c Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b7579b25c8159bfda7b70c9ec005aae243017563 Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/301b91c56556e8edd6b59837731e5eb4aa5a9685 Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7f7f1750d4ca7b03ca0bfc2b89dd466816514fe6 Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs @ 2022-05-12 15:32 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-05-12 15:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs. This follows in the footsteps of commit 2591ee8ec by removing one more ill-advised shortcut from planning of GroupingFuncs. It's true that we don't intend to execute the argument expression(s) at runtime, but we still have to process any Vars appearing within them, or we risk failure at setrefs.c time (or more fundamentally, in EXPLAIN trying to print such an expression). Vars in upper plan nodes have to have referents in the next plan level, whether we ever execute 'em or not. Per bug #17479 from Michael J. Sullivan. Back-patch to all supported branches. Richard Guo Discussion: https://postgr.es/m/17479-6260deceaf0ad304@postgresql.org Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b53442f6fe0f82cc7c2d1e7b15d52da79e6db295 Modified Files -------------- src/backend/optimizer/util/var.c | 10 +---- src/test/regress/expected/groupingsets.out | 64 ++++++++++++++++++++++++++++++ src/test/regress/sql/groupingsets.sql | 23 +++++++++++ 3 files changed, 89 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-05-12 15:32 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs Tom Lane <tgl@sss.pgh.pa.us> 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs Tom Lane <tgl@sss.pgh.pa.us> 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs Tom Lane <tgl@sss.pgh.pa.us> 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs Tom Lane <tgl@sss.pgh.pa.us> 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs Tom Lane <tgl@sss.pgh.pa.us> 2022-05-12 15:32 pgsql: Make pull_var_clause() handle GroupingFuncs exactly like Aggrefs 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