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.
On 20/11/2025 05:36, Chao Li wrote:
I have no concern if we decide to no longer support tailing spaces, while I
still got a couple of small comments:
1
```
-/* return whether str matches "^\s*[-+]?[0-9]+$" */
+/*
+ * Return whether str matches "^\s*[-+]?[0-9]+$"
+ *
+ * This should agree with s
> On Nov 19, 2025, at 23:37, Heikki Linnakangas wrote:
>
> Here's a small patch to replace the int64 parsing code in pgbench with a call
> to strtoi64(). Makes it a little simpler.
>
> Spotted this while grepping for all the different integer parsing functions
> we have. We could probably c
On Thu, Nov 20, 2025 at 9:27 AM Tom Lane 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
Neil Chen 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 accepte
Hi,
On Thu, Nov 20, 2025 at 8:57 AM Heikki Linnakangas wrote:
> Here's a small patch to replace the int64 parsing code in pgbench with a
> call to strtoi64(). Makes it a little simpler.
>
>
+1 on this simplification – it definitely makes the code cleaner.
One small note: the updated code doesn’t
Hi Heikki:
On Thu, Nov 20, 2025 at 8:45 AM Heikki Linnakangas wrote:
> Here's a small patch to replace the int64 parsing code in pgbench with a
> call to strtoi64(). Makes it a little simpler.
>
> Spotted this while grepping for all the different integer parsing
> functions we have. We could pro
() in pgbench, replacing its open-coded
implementation
Makes the code a little simpler.
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 o