Re: libpq: Fix wrong connection status on invalid "connect_timeout"
Lars Kanis <lars@greiz-reinsdorf.de>
From: Lars Kanis <lars@greiz-reinsdorf.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-10-18T12:01:23Z
Lists: pgsql-hackers
Attachments
- libpq-parse-fix-v2.patch (text/x-patch) patch v2
Am 18.10.19 um 05:06 schrieb Michael Paquier: > So attached is a patch to skip trailing whitespaces as well, > which also fixes the issue with ECPG. I have refactored the parsing > logic a bit while on it. The comment at the top of parse_int_param() > needs to be reworked a bit more. I tested this and it looks good to me. Maybe you could omit some redundant 'end' checks, as in the attached patch. Or was your intention to verify non-NULL 'end'? > Perhaps we could add directly regression > tests for libpq. I'll start a new thread about that once we are done > here, the topic is larger. We have around 650 tests on ruby-pg to ensure everything runs as expected and I always wondered how the API of libpq is being verified. -- Kind Regards, Lars Kanis
Commits
-
Fix error reporting of connect_timeout in libpq for value parsing
- ed5109a616cf 12.1 landed
- ba19a6b73c5b 13.0 landed
-
Fix parsing of integer values for connection parameters in libpq
- 2b0f959b5119 12.1 landed
- 4f4061b2dde1 13.0 landed
-
Parse more strictly integer parameters from connection strings in libpq
- e7a2217978d9 12.0 cited