From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: refactoring - share str2*int64 functions |
Date: | 2019-07-29 01:48:41 |
Message-ID: | 20190729014841.GD6959@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-07-29 01:50:59 | Re: TopoSort() fix |
Previous Message | Thomas Munro | 2019-07-29 01:37:28 | Re: POC: Cleaning up orphaned files using undo logs |