Re: POC: converting Lists into arrays

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: POC: converting Lists into arrays
Date: 2019-08-08 03:36:44
Message-ID: CAMsr+YGTrK023TUkCMj9pBeX0eyrdMO0D9=SBAQ0B4t3-8R8-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 1 Aug 2019 at 07:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Andres Freund <andres(at)anarazel(dot)de> writes:
> > Unfortunately foreach(ListCell *lc, ...) doesn't work with the current
> > definition. Which I think isn't great, because the large scopes for loop
> > iteration variables imo makes the code harder to reason about.
>
>
Totally agree.

>
> you can only put one <declaration> into the first element of a
> for (;;).
>

Use an anonymous block outer scope? Or if not permitted even by C99 (which
I think it is), a do {...} while (0); hack?

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2019-08-08 03:57:12 Re: Proposal for Signal Detection Refactoring
Previous Message Kyotaro Horiguchi 2019-08-08 03:15:38 Re: Small patch to fix build on Windows