Re: Use strtoi64() in pgbench, replacing its open-coded implementation
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Chao Li <li.evan.chao@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-11-21T13:24:35Z
Lists: pgsql-hackers
On 2025-Nov-21, Heikki Linnakangas wrote: > I don't feel the urge to refactor this myself right now, but we probably > could simplify this further. For example, I wonder if we should remove > is_an_int() altogether and rely on strtoi64() to return failure if the input > does't look like a integer. I had the same thought -- is_an_int() is not doing anything useful and it would be better to get rid of it. If we do have an integer-looking that doesn't fit in int64, then maybe treating it as a double is not wrong. (I suppose if we wanted to have numeric values beyond int64 range and not lose precision, we would have to add separate support for that.) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Commits
-
Use strtoi64() in pgbench, replacing its open-coded implementation
- 2aabaa52dffd 19 (unreleased) landed