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