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

Поиск
Список
Период
Сортировка
От Neil Chen
Тема Re: Use strtoi64() in pgbench, replacing its open-coded implementation
Дата
Msg-id CAA3qoJkE+dgGWbWiP8dCjQnWQ0NB=MdFuto60GcgeXP0uU=0AA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use strtoi64() in pgbench, replacing its open-coded implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On Thu, Nov 20, 2025 at 9:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

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.


My mistake – Heikki is absolutely right.
Looking at the two call sites of the function: one filters out trailing spaces within the 'is_an_int' function, and the other in exprscan.l won’t pass strings with trailing spaces either.
 
I didn't try to verify the latter assertion, but if it's true,
we don't need the extra complication.


make sense

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