postgresql/src/include
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
..
access Remove unneeded argument from _bt_getstackbuf(). 2019-02-25 17:47:43 -08:00
bootstrap Update copyright for 2019 2019-01-02 12:44:25 -05:00
catalog Move code for managing PartitionDescs into a new file, partdesc.c 2019-02-21 11:45:02 -05:00
commands Use slots in trigger infrastructure, except for the actual invocation. 2019-02-26 20:31:38 -08:00
common Change floating-point output format for improved performance. 2019-02-13 15:20:33 +00:00
datatype Update copyright for 2019 2019-01-02 12:44:25 -05:00
executor Use slots in trigger infrastructure, except for the actual invocation. 2019-02-26 20:31:38 -08:00
fe_utils pgbench: add \cset and \gset commands 2019-01-10 13:42:20 -03:00
foreign Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
jit Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
lib simplehash: Add support for resetting a hashtable's contents. 2019-02-09 01:05:49 -08:00
libpq Get rid of another unconstify through API changes 2019-02-14 20:44:47 +01:00
mb Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodes Standardize some more loops that chase down parallel lists. 2019-02-28 14:25:01 -05:00
optimizer Allow extensions to generate lossy index conditions. 2019-02-11 21:26:14 -05:00
parser Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
partitioning Move code for managing PartitionDescs into a new file, partdesc.c 2019-02-21 11:45:02 -05:00
port Fix previous MinGW fix. 2019-02-16 15:23:02 +00:00
portability Update copyright for 2019 2019-01-02 12:44:25 -05:00
postmaster Update copyright for 2019 2019-01-02 12:44:25 -05:00
regex Update copyright for 2019 2019-01-02 12:44:25 -05:00
replication Update copyright for 2019 2019-01-02 12:44:25 -05:00
rewrite Update copyright for 2019 2019-01-02 12:44:25 -05:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
storage Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
tcop Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsearch Update copyright for 2019 2019-01-02 12:44:25 -05:00
utils Move estimate_hashagg_tablesize to selfuncs.c, and widen result to double. 2019-02-21 14:59:12 -05:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Install JIT related headers. 2019-01-28 13:51:12 -08:00
c.h Use an unsigned char for bool if we don't use the native bool. 2019-02-20 21:31:02 +00:00
fmgr.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
funcapi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
getaddrinfo.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
getopt_long.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
miscadmin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_config.h.in Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT. 2019-02-15 23:22:33 -05:00
pg_config.h.win32 Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT. 2019-02-15 23:22:33 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_getopt.h Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
pg_trace.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgstat.h Add more columns to pg_stat_ssl 2019-02-01 00:33:47 +01:00
pgtar.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgtime.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
port.h Cygwin and Mingw floating-point fixes. 2019-02-16 01:50:16 +00:00
postgres.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rusagestub.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
windowapi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00