pg_amcheck: Fix block number parsing on command line

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_amcheck: Fix block number parsing on command line
Date: 2021-07-22 14:56:56
Message-ID: 6a10a211-872b-3c4c-106b-909ae5fefa61@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


It seems to me that when using the pg_amcheck --startblock and
--endblock options on platforms where sizeof(long) == 4, you cannot
specify higher block numbers (unless you do tricks with negative
numbers). The attached patch should fix this by using strtoul() instead
of strtol(). I also tightened up the number scanning a bit in other
ways, similar to the code in other frontend utilities. I know some
people have been working on tightening all this up. Please check that
it's up to speed.

Attachment Content-Type Size
0001-pg_amcheck-Fix-block-number-parsing-on-command-line.patch text/plain 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2021-07-22 14:58:40 Re: psql - add SHOW_ALL_RESULTS option
Previous Message Fabien COELHO 2021-07-22 14:49:30 Re: psql - add SHOW_ALL_RESULTS option