Re: initdb: Refactor PG_CMD_PUTS loops

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: initdb: Refactor PG_CMD_PUTS loops
Дата
Msg-id CAFBsxsFZpsQds47cJFoVRMrs66QtfLwXzpOn+BxmR2s8hftrUg@mail.gmail.com
обсуждение исходный текст
Ответ на initdb: Refactor PG_CMD_PUTS loops  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers

On Thu, Dec 1, 2022 at 5:02 PM Peter Eisentraut <peter.eisentraut@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
> cases, one might want to use PG_CMD_PRINTF() instead, to parametrize a
> command, but that would require breaking up the loop or using
> workarounds like replace_token().  This patch unwinds all that; it's
> much simpler that way.

+1,  I can't think of a reason to keep the current coding

--
John Naylor
EDB: http://www.enterprisedb.com

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: O(n) tasks cause lengthy startups and checkpoints
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Time delayed LR (WAS Re: logical replication restrictions)