On Wed, Aug 28, 2019 at 08:51:29AM +0200, Fabien COELHO wrote:
> Here is an updated patch for the u?int64 conversion functions.
Thanks!
> I have taken the liberty to optimize the existing int64 function by removing
> spurious tests.
Which are?
> I have not created uint64 specific inlined overflow functions.
Why? There is a comment below ;p
> If it looks ok, a separate patch could address the 32 & 16 versions.
I am surprised to see a negative diff actually just by doing that
(adding the 32 and 16 parts will add much more code of course). At
quick glance, I think that this is on the right track. Some comments
I have on the top of my mind:
- It would me good to have the unsigned equivalents of
pg_mul_s64_overflow, etc. These are simple enough, and per the
feedback from Andres they could live in common/int.h.
- It is more consistent to use upper-case statuses in the enum
strtoint_status. Could it be renamed to pg_strtoint_status?
--
Michael