| От | Peter Eisentraut |
|---|---|
| Тема | Re: initdb: Refactor PG_CMD_PUTS loops |
| Дата | |
| Msg-id | 924d08b2-0fb0-a97e-2e2e-7c365ea42f0c@enterprisedb.com обсуждение исходный текст |
| Ответ на | Re: initdb: Refactor PG_CMD_PUTS loops (Andrew Dunstan <andrew@dunslane.net>) |
| Список | pgsql-hackers |
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, 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. > > Looks reasonable. (Most of this dates back to 2003/2004, the very early > days of initdb.c.) committed
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера