pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Improve pull_up_subqueries logic so that it doesn't insert
2+ messages / 2 participants
[nested] [flat]
* pgsql: Improve pull_up_subqueries logic so that it doesn't insert
@ 2009-04-28 21:31 Tom Lane <tgl@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: tgl@postgresql.org @ 2009-04-28 21:31 UTC (permalink / raw)
To: pgsql-committers
Log Message:
-----------
Improve pull_up_subqueries logic so that it doesn't insert unnecessary
PlaceHolderVar nodes in join quals appearing in or below the lowest
outer join that could null the subquery being pulled up. This improves
the planner's ability to recognize constant join quals, and probably
helps with detection of common sort keys (equivalence classes) as well.
Modified Files:
--------------
pgsql/src/backend/optimizer/plan:
planner.c (r1.254 -> r1.255)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planner.c?r1=1.254&r2=...)
pgsql/src/backend/optimizer/prep:
prepjointree.c (r1.64 -> r1.65)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepjointree.c?r1=1.64&...)
pgsql/src/include/optimizer:
prep.h (r1.64 -> r1.65)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/prep.h?r1=1.64&r2=1.65)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Adjust reltarget assignment for UPPERREL_PARTIAL_DISTINCT rel
@ 2024-02-07 08:22 David Rowley <drowley@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: David Rowley @ 2024-02-07 08:22 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Adjust reltarget assignment for UPPERREL_PARTIAL_DISTINCT rel
A comment in grouping_planner() claimed that the PlannerInfo
upper_targets array was not used in core code. However, the code that
generated the paths for the UPPERREL_PARTIAL_DISTINCT rel made that
comment untrue.
Here we adjust the create_distinct_paths() function signature to pass
down the PathTarget the same as is done for create_grouping_paths(),
thus making the aforementioned comment true again.
In passing adjust the order of the upper_targets[] assignments. These
seem to be following the reverse enum order apart from
UPPERREL_PARTIAL_DISTINCT.
Also, update the header comment for generate_gather_paths() to mention
the function is also used to create gather paths for partial distinct
paths.
Author: Richard Guo, David Rowley
Discussion: https://postgr.es/m/CAMbWs48u9VoVOouJsys1qOaC9WVGVmBa+wT1dx8KvxF5GPzezA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/902900b308fb38543b95526b1f384bf3cce2f514
Modified Files
--------------
src/backend/optimizer/path/allpaths.c | 8 ++++----
src/backend/optimizer/plan/planner.c | 22 ++++++++++++++--------
2 files changed, 18 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-02-07 08:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 21:31 pgsql: Improve pull_up_subqueries logic so that it doesn't insert Tom Lane <tgl@postgresql.org>
2024-02-07 08:22 pgsql: Adjust reltarget assignment for UPPERREL_PARTIAL_DISTINCT rel David Rowley <drowley@postgresql.org>
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