Re: [PATCH] - Provide robust alternatives for replace_string

Поиск
Список
Период
Сортировка
От Asim Praveen
Тема Re: [PATCH] - Provide robust alternatives for replace_string
Дата
Msg-id 367C3AB6-2A17-49C0-93F4-DB125C3397A7@vmware.com
обсуждение исходный текст
Ответ на Re: [PATCH] - Provide robust alternatives for replace_string  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [PATCH] - Provide robust alternatives for replace_string  (Georgios <gkokolatos@protonmail.com>)
Список pgsql-hackers

> On 05-Aug-2020, at 7:01 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> On 2020-Aug-05, Asim Praveen wrote:
>
>> Please find attached a StringInfo based solution to this problem.  It
>> uses fgetln instead of fgets such that a line is read in full, without
>> ever splitting it.
>
> never heard of fgetln, my system doesn't have a manpage for it, and we
> don't use it anywhere AFAICS.  Are you planning to add something to
> src/common for it?
>

Indeed!  I noticed fgetln on the man page of fgets and used it without checking.  And this happened on a MacOS system.

Please find a revised version that uses fgetc instead.

Asim


Вложения

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

Предыдущее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: Amcheck: do rightlink verification with lock coupling
Следующее
От: Michael Paquier
Дата:
Сообщение: Switch to multi-inserts for pg_depend