| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Use strtoi64() in pgbench, replacing its open-coded implementation |
| Date: | 2025-11-21 13:24:35 |
| Message-ID: | 202511211320.2cf7ygcyrkbs@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| 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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Boris Mironov | 2025-11-21 13:26:05 | Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) |
| Previous Message | Peter Eisentraut | 2025-11-21 13:20:59 | Re: Update timezone to C99 |