Re: POC: converting Lists into arrays

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: POC: converting Lists into arrays
Дата
Msg-id CAMsr+YGTrK023TUkCMj9pBeX0eyrdMO0D9=SBAQ0B4t3-8R8-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC: converting Lists into arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: POC: converting Lists into arrays  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, 1 Aug 2019 at 07:40, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andres Freund <andres@anarazel.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Small patch to fix build on Windows
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Proposal for Signal Detection Refactoring