pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Skip trailing whitespaces when parsing integer options
Date: Tue, 27 Jul 2021 01:41:12 +0000
Message-ID: <E1m8C5o-0007CD-4J@gemulon.postgresql.org> (raw)

Skip trailing whitespaces when parsing integer options

strtoint(), via strtol(), would skip leading whitespaces but the same
rule was not applied for trailing whitespaces, leading to an
inconsistent behavior.  Some tests are changed to cover more this area.

Author: Michael Paquier
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/YP5Pv0d13Ct+03ve@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7a9a3d4b24a4ad0de7992f01a0dd2a02ccd30a4

Modified Files
--------------
src/bin/pg_basebackup/t/020_pg_receivewal.pl | 4 +++-
src/bin/pg_dump/t/001_basic.pl               | 3 ++-
src/fe_utils/option_utils.c                  | 9 ++++++++-
3 files changed, 13 insertions(+), 3 deletions(-)



Message-ID: <E1m8C5o-0007CD-4J@gemulon.postgresql.org>
Permalink:  ../E1m8C5o-0007CD-4J@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1m8C5o-0007CD-4J@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Skip trailing whitespaces when parsing integer options
  In-Reply-To: <E1m8C5o-0007CD-4J@gemulon.postgresql.org>
  References: <E1m8C5o-0007CD-4J@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox