Re: initdb: Refactor PG_CMD_PUTS loops

2022-12-05 Thread Peter Eisentraut
On 02.12.22 15:07, Andrew Dunstan wrote: On 2022-12-01 Th 05:02, Peter Eisentraut wrote: Keeping the SQL commands that initdb runs in string arrays before feeding them to PG_CMD_PUTS() seems unnecessarily verbose and inflexible.  In some cases, the array only has one member.  In other cases,

Re: initdb: Refactor PG_CMD_PUTS loops

2022-12-02 Thread Andrew Dunstan
On 2022-12-01 Th 05:02, Peter Eisentraut wrote: > Keeping the SQL commands that initdb runs in string arrays before > feeding them to PG_CMD_PUTS() seems unnecessarily verbose and > inflexible.  In some cases, the array only has one member.  In other > cases, one might want to use

Re: initdb: Refactor PG_CMD_PUTS loops

2022-12-01 Thread John Naylor
On Thu, Dec 1, 2022 at 5:02 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > > Keeping the SQL commands that initdb runs in string arrays before > feeding them to PG_CMD_PUTS() seems unnecessarily verbose and > inflexible. In some cases, the array only has one member. In other >

initdb: Refactor PG_CMD_PUTS loops

2022-12-01 Thread Peter Eisentraut
require breaking up the loop or using workarounds like replace_token(). This patch unwinds all that; it's much simpler that way.From e177a142a9a5412ff8aeb271330005ef518b32d1 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 1 Dec 2022 09:49:48 +0100 Subject: [PATCH] initdb: Refactor