Re: Incorrect usage of strtol, atoi for non-numeric junk inputs - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Incorrect usage of strtol, atoi for non-numeric junk inputs
Date
Msg-id YP5Pv0d13Ct+03ve@paquier.xyz
Whole thread Raw
In response to Re: Incorrect usage of strtol, atoi for non-numeric junk inputs  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Incorrect usage of strtol, atoi for non-numeric junk inputs  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Sat, Jul 24, 2021 at 07:41:12PM +0900, Michael Paquier wrote:
> I have looked at that over the last couple of days, and applied it
> after some small fixes, including an indentation.

One thing that we forgot here is the handling of trailing
whitespaces.  Attached is small patch to adjust that, with one
positive and one negative tests.

> The int64 and float
> parts are extra types we could handle, but I have not looked yet at
> how much benefits we'd get in those cases.

I have looked at these two but there is really less benefits, so for
now I am not planning to do more in this area.  For float options,
pg_basebackup --max-rate could be one target on top of the three set
of options in pgbench, but it needs to handle units :(
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "tanghy.fnst@fujitsu.com"
Date:
Subject: RE: [Doc] Tiny fix for regression tests example
Next
From: Michael Paquier
Date:
Subject: Some code cleanup for pgbench and pg_verifybackup