Re: [PATCH] libpq improvements and fixes

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] libpq improvements and fixes
Дата
Msg-id 20200214061352.GE1998@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] libpq improvements and fixes  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: [PATCH] libpq improvements and fixes  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
On Thu, Feb 13, 2020 at 02:22:36PM -0300, Ranier Vilela wrote:
> I just kept it, even if I duplicated the error message, the style was kept
> and in my opinion it is much more coherent and readable.
> But your solution is also good, and yes, it is worth it, because even with
> small benefits, the change improves the code and prevents Coverity or
> another tool from continuing to report false positives or not.

Complaints from static analyzers need to be taken with a pinch of
salt, and I agree with Tom here.

> Virtually no code will break for the change, since bool and int are
> internally the same types.
> I believe that no code will have either adjusted to work with corrected
> functions, even if they use compiled libraries.
> And again, it is worth correcting at least the static ones, because the
> goal here, too, is to improve readability.

FWIW, looking at the patch from upthread, I think that it is not that
wise to blindly break the error compatibility handling of all PQsend*
routines by switching the error handling of the connection to be after
the compatibility checks, and all the other changes don't justify a
breakage making back-patching more complicated nor do they improve
readability at great lengths.
--
Michael

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Следующее
От: keisuke kuroda
Дата:
Сообщение: Re: In PG12, query with float calculations is slower than PG11