Re: libpq stricter integer parsing

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: libpq stricter integer parsing
Дата
Msg-id 20180911090002.GB31650@paquier.xyz
обсуждение исходный текст
Ответ на Re: libpq stricter integer parsing  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: libpq stricter integer parsing  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Sun, Sep 09, 2018 at 09:01:15AM +0200, Fabien COELHO wrote:
> Hmmm. This is what the sentence following the above tries to explain
> implicitely:
>
>   Versions of <application>libpq</application> before
>   <product>PostgreSQL 12</product> accepted trailing garbage or overflows.
>
> Maybe I can rephrase it in one sentence, eg:
>
> "From PostgreSQL 12, integer values for keywords ... are parsed strictly,
> i.e. trailing garbage and errors on overflows are not accepted
> anymore."

Okay, I am including that formulation.  I have not put yet much thoughts
into locating this in another place of the docs.  Or perhaps we could
just discard it from the final commit.

I have been reviewing your patch a bit more, and I have found an issue:
overflows are not correctly detected.  For example by specifying
something like port=5000000000 I would have expected an error but the
parsing code failed to detect that.  Values like -1 need to be accepted
though are equivalent to an unknown state when it comes to keepalive_*.

In conclusion, I finish with the simplified patch attached.  Fabien, is
that acceptable to you?
--
Michael

Вложения

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

Предыдущее
От: Marina Polyakova
Дата:
Сообщение: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Следующее
От: Amit Khandekar
Дата:
Сообщение: Re: Query is over 2x slower with jit=on