Re: Add new for_each macros for iterating over a List that do not require ListCell pointer - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
Date
Msg-id CAGECzQSdUgxNcA=kJVuc=o6NbiZBa=4CA-0kAjFxQAYjx8A6JA@mail.gmail.com
Whole thread Raw
In response to Re: Add new for_each macros for iterating over a List that do not require ListCell pointer  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
List pgsql-hackers
On Fri, 1 Dec 2023 at 05:20, Nathan Bossart <nathandbossart@gmail.com> wrote:
> Could we simplify it with something like the following?

Great suggestion! Updated the patchset accordingly.

This made it also easy to change the final patch to include the
automatic scoped declaration logic for all of the new macros. I quite
like how the calling code changes to not have to declare the variable.
But it's definitely a larger divergence from the status quo than
without patch 0003. So I'm not sure if it's desired.

Finally, I also renamed the functions to use foreach instead of
for_each, since based on this thread that seems to be the generally
preferred naming.

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: logical decoding and replication of sequences, take 2
Next
From: "Tristan Partin"
Date:
Subject: Re: Add --check option to pgindent