Re: Remove pg_strtouint64(), use strtoull() directly

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Remove pg_strtouint64(), use strtoull() directly
Дата
Msg-id c7c03d06-c5d8-9a80-071e-0f2d2842e4b1@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Remove pg_strtouint64(), use strtoull() directly  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Remove pg_strtouint64(), use strtoull() directly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Life cycles of tuple descriptors
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Column Filtering in Logical Replication