Re: Use strtoi64() in pgbench, replacing its open-coded implementation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use strtoi64() in pgbench, replacing its open-coded implementation
Дата
Msg-id 1775639.1763602029@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Use strtoi64() in pgbench, replacing its open-coded implementation  (Neil Chen <carpenter.nail.cz@gmail.com>)
Ответы Re: Use strtoi64() in pgbench, replacing its open-coded implementation
Список pgsql-hackers
Neil Chen <carpenter.nail.cz@gmail.com> writes:
> +1 on this simplification – it definitely makes the code cleaner.
> One small note: the updated code doesn’t handle trailing spaces in the
> input string. Should we consider this a concern?

Heikki's draft commit message addresses that point:

    The old implementation accepted trailing whitespace, but that seemed
    unnecessary. Firstly, its sibling function for parsing decimals,
    strtodouble(), does not accept trailing whitespace. Secondly, none of
    the callers can pass a string with trailing whitespace to it.

I didn't try to verify the latter assertion, but if it's true,
we don't need the extra complication.

            regards, tom lane



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