On Thu, Jul 18, 2019 at 09:16:22PM -0700, Andres Freund wrote: > On 2019-07-19 12:21:27 +0900, Michael Paquier wrote: > Why not common? It's not a platform dependent bit. Could even be put > into the already existing string.c.
That would be fine to me, it is not like this file is bloated now. >> - One set of functions for the backend, called pg_stro[u]intXX_backend >> or pg_backend_stro[u]intXX which can take as extra argument error_ok, >> calling the portions in src/port/, and move those functions in a new >> file prefixed with "backend_" in src/backend/utils/misc/ with a name >> consistent with the one in src/port/ (with the previous naming that >> would be backend_strtoint.c) > > I'm not following. What would be the point of any of this? The error_ok > bit is unnecessary, because the function is exactly the same as the > generic function. And the backend_ prefix would be pretty darn weird, > given that that's already below src/backend. Do you have a better idea of name for those functions? >> - We also need the unsigned-specific equivalents of >> pg_mul_s64_overflow and such, so I would suggest putting that in a new >> header, simply uint.h. If I finish by committing this stuff, I would >> handle that in a separate commit. > > Why not the same header? I fail to see what we'd gain by splitting it > up. No objections to that at the end. Fabien, are you planning to send an updated patch? This stuff has value. -- Michael
signature.asc
Description: PGP signature