Re: initdb's -c option behaves wrong way?

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: initdb's -c option behaves wrong way?
Дата
Msg-id E54AEDA7-D20D-48A6-95B6-1502875EFFC5@yesql.se
обсуждение исходный текст
Ответ на Re: initdb's -c option behaves wrong way?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: initdb's -c option behaves wrong way?
Список pgsql-hackers
> On 19 Jan 2024, at 17:33, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> I'll give some more time for opinions, then I'll go ahead with one of the
>> patches with a backpatch to v16.
>
> OK, I take back my previous complaint that just using strncasecmp
> would be enough --- I was misremembering how the code worked, and
> you're right that it would use the spelling from the command line
> rather than that from the file.
>
> However, the v3 patch is flat broken.  You can't assume you have
> found a match until you've verified that whitespace and '='
> appear next --- otherwise, you'll be fooled by a guc_name that
> is a prefix of one that appears in the file.  I think the simplest
> change that does it correctly is as attached.

The attached v4 looks good to me, I don't think it moves the needle wrt
readability (ie, no need to move the search).  Feel free to go ahead with that
version, or let me know if you want me to deal with it.

--
Daniel Gustafsson




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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Synchronizing slots from primary to standby
Следующее
От: David Rowley
Дата:
Сообщение: Re: Prefetch the next tuple's memory during seqscans