pg_amcheck: Fix block number parsing on command line - Mailing list pgsql-hackers

From Peter Eisentraut
Subject pg_amcheck: Fix block number parsing on command line
Date
Msg-id 6a10a211-872b-3c4c-106b-909ae5fefa61@enterprisedb.com
Whole thread Raw
Responses Re: pg_amcheck: Fix block number parsing on command line  (Mark Dilger <mark.dilger@enterprisedb.com>)
Re: pg_amcheck: Fix block number parsing on command line  (Michael Paquier <michael@paquier.xyz>)
List 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

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: psql - add SHOW_ALL_RESULTS option
Next
From: Fabien COELHO
Date:
Subject: Re: psql - add SHOW_ALL_RESULTS option