[HACKERS] Unused field of ProjectionPath

Поиск
Список
Период
Сортировка
От Antonin Houska
Тема [HACKERS] Unused field of ProjectionPath
Дата
Msg-id 18467.1501762770@localhost
обсуждение исходный текст
Ответы Re: [HACKERS] Unused field of ProjectionPath  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I've noticed that the dummypp field of ProjectionPath is set but never read.

If the only possible change between the path and plan creation time is that
the projection path and the subpath targetlists become different, then dummypp
could be used this way:

diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
new file mode 100644
index 5c934f2..1910d3f
*** a/src/backend/optimizer/plan/createplan.c
--- b/src/backend/optimizer/plan/createplan.c
*************** create_projection_plan(PlannerInfo *root
*** 1572,1578 ****        * not using.)        */       if (is_projection_capable_path(best_path->subpath) ||
!               tlist_same_exprs(tlist, subplan->targetlist))       {               /* Don't need a separate Result,
justassign tlist to subplan */               plan = subplan; 
--- 1572,1578 ----        * not using.)        */       if (is_projection_capable_path(best_path->subpath) ||
!               (best_path->dummypp && tlist_same_exprs(tlist, subplan->targetlist)))       {               /* Don't
needa separate Result, just assign tlist to subplan */               plan = subplan; 


On the other hand, if the targetlists can also be different at path creation
time and equal at plan creation time, the lists do always need comparison at
plan creation time and the dummypp field should probably be removed.


--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative
Следующее
От: Rushabh Lathia
Дата:
Сообщение: Re: [HACKERS] reload-through-the-top-parent switch the partition table