Re: Remove pg_strtouint64(), use strtoull() directly - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Remove pg_strtouint64(), use strtoull() directly
Date
Msg-id c7c03d06-c5d8-9a80-071e-0f2d2842e4b1@enterprisedb.com
Whole thread Raw
In response to Re: Remove pg_strtouint64(), use strtoull() directly  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remove pg_strtouint64(), use strtoull() directly
List pgsql-hackers
On 13.12.21 15:44, Tom Lane wrote:
> Our current hard-coded uses of long long are all written on the
> assumption that it's*at least*  64 bits, so we'd survive OK on
> such a platform so long as we don't start confusing it with
> *exactly*  64 bits.

OK, makes sense.  Here is an alternative patch.  It introduces two 
light-weight macros strtoi64() and strtou64() (compare e.g., strtoimax() 
in POSIX) in c.h and removes pg_strtouint64().  This moves the 
portability layer from numutils.c to c.h, so it's closer to the rest of 
the int64 portability code.  And that way it is available to not just 
server code.  And it resolves the namespace collision with the 
pg_strtointNN() functions in numutils.c.
Attachment

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Life cycles of tuple descriptors
Next
From: Tomas Vondra
Date:
Subject: Re: Column Filtering in Logical Replication