Michaël-san,
>> I have looked quickly at it, but I'm not sure that there is an agreement
>> about what should be done precisely, so the feedback is not clearly
>> actionable.
>
> Per the latest trends, it seems that the input of Andres was kind of
> the most interesting pieces.
Yes, definitely. I understood that we want in "string.h" something like
(just the spirit):
typedef enum {
STRTOINT_OK, STRTOINT_RANGE_ERROR, STRTOINT_SYNTAX_ERROR
} strtoint_status;
strtoint_status pg_strtoint64(const char * str, int64 * result);
However there is a contrary objective to have a unified interface,
but there also exists a:
extern uint64 pg_strtouint64(const char *str, char **endptr, int base);
called 3 times, always with base == 10. We have a similar name but a
totally different interface, so basically it would have to be replaced
by something like the first interface.
> If you don't have room for it, I would not mind doing the legwork
> myself.
I think that it would be quick if the what is clear enough, so I can do
it.
--
Fabien.