postgresql/src/include/nodes
Tom Lane c94fb8e8ac Standardize some more loops that chase down parallel lists.
We have forboth() and forthree() macros that simplify iterating
through several parallel lists, but not everyplace that could
reasonably use those was doing so.  Also invent forfour() and
forfive() macros to do the same for four or five parallel lists,
and use those where applicable.

The immediate motivation for doing this is to reduce the number
of ad-hoc lnext() calls, to reduce the footprint of a WIP patch.
However, it seems like good cleanup and error-proofing anyway;
the places that were combining forthree() with a manually iterated
loop seem particularly illegible and bug-prone.

There was some speculation about restructuring related parsetree
representations to reduce the need for parallel list chasing of
this sort.  Perhaps that's a win, or perhaps not, but in any case
it would be considerably more invasive than this patch; and it's
not particularly related to my immediate goal of improving the
List infrastructure.  So I'll leave that question for another day.

Patch by me; thanks to David Rowley for review.

Discussion: https://postgr.es/m/11587.1550975080@sss.pgh.pa.us
2019-02-28 14:25:01 -05:00
..
bitmapset.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
execnodes.h Use slots in trigger infrastructure, except for the actual invocation. 2019-02-26 20:31:38 -08:00
extensible.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
lockoptions.h Don't include heapam.h from others headers. 2019-01-14 16:24:41 -08:00
makefuncs.h Make some small planner API cleanups. 2019-01-29 15:26:44 -05:00
memnodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeFuncs.h Make some small planner API cleanups. 2019-01-29 15:26:44 -05:00
nodes.h Allow extensions to generate lossy index conditions. 2019-02-11 21:26:14 -05:00
params.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parsenodes.h Remove unnecessary use of PROCEDURAL 2019-02-25 08:38:59 +01:00
pathnodes.h Simplify the planner's new representation of indexable clauses a little. 2019-02-14 19:37:30 -05:00
pg_list.h Standardize some more loops that chase down parallel lists. 2019-02-28 14:25:01 -05:00
plannodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
primnodes.h Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
print.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
readfuncs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
replnodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
supportnodes.h Allow extensions to generate lossy index conditions. 2019-02-11 21:26:14 -05:00
tidbitmap.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
value.h Update copyright for 2019 2019-01-02 12:44:25 -05:00