On Sun, Jul 14, 2019 at 3:22 AM Fabien COELHO <coe...@cri.ensmp.fr> wrote:
> Here is the updated patch on which I checked "make check-world".

Thanks!  So, we're moving pg_strtouint64() to a place where frontend
code can use it, and getting rid of some duplication.  I like it.  I
wanted this once before myself[1].

+extern bool pg_strtoint64(const char *str, bool errorOK, int64 *result);
+extern uint64 pg_strtouint64(const char *str, char **endptr, int base);

One of these things is not like the other.  Let's see... the int64
version is used only by pgbench and is being promoted to common where
it can be used by more code.  With a name like that, wouldn't it make
sense to bring it into line with the uint64 interface, and then move
pgbench's error reporting stuff back into pgbench?  The uint64 one
derives its shape from the family of standard functions like strtol()
so I think it wins.

[1] 
https://www.postgresql.org/message-id/CAEepm=2kec8xdbewgdtdobxgqphfw4kcd7bzxr6nmfihjjn...@mail.gmail.com

-- 
Thomas Munro
https://enterprisedb.com


Reply via email to