Re: [PATCH] - Provide robust alternatives for replace_string

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH] - Provide robust alternatives for replace_string
Дата
Msg-id 20200801015202.GA17318@alvherre.pgsql
обсуждение исходный текст
Ответ на [PATCH] - Provide robust alternatives for replace_string  (Georgios <gkokolatos@protonmail.com>)
Ответы Re: [PATCH] - Provide robust alternatives for replace_string  (Asim Praveen <pasim@vmware.com>)
Список pgsql-hackers
What happens if a replacement string happens to be split in the middle
by the fgets buffering?  I think it'll fail to be replaced.  This
applies to both versions.

In the stringinfo version it seemed to me that using pnstrdup is
possible to avoid copying trailing bytes.

If you're asking for opinion, mine is that StringInfo looks to be the
better approach, and also you don't need to keep API compatibility.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Concurrency bug in amcheck
Следующее
От: Dmitry Markman
Дата:
Сообщение: Re: windows config.pl question