Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
Date: 2023-10-25 10:39:01
Message-ID: CAGECzQRA+sZH94TsN_Rewi3Fk6EeQueCUvuep+ngdXSqnvZ=kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached is a slightly updated version, with a bit simpler
implementation of foreach_delete_current.
Instead of decrementing i and then adding 1 to it when indexing the
list, it now indexes the list using a postfix decrement.

Attachment Content-Type Size
v4-0002-Use-new-for_each_xyz-macros-in-a-few-places.patch application/x-patch 7.3 KB
v4-0001-Add-macros-for-looping-through-a-list-without-nee.patch application/x-patch 6.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Smolkin Grigory 2023-10-25 10:39:41 race condition in pg_class
Previous Message Jelte Fennema 2023-10-25 10:05:41 Re: Add new for_each macros for iterating over a List that do not require ListCell pointer