Re: Underscore in positional parameters? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Underscore in positional parameters?
Date
Msg-id Zkafn08nGVU2ucaC@paquier.xyz
Whole thread Raw
In response to Re: Underscore in positional parameters?  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Underscore in positional parameters?
List pgsql-hackers
On Thu, May 16, 2024 at 08:41:11AM +0200, Peter Eisentraut wrote:
> On this specific patch, maybe reword "parameter too large" to "parameter
> number too large".

WFM here.

> Also, I was bemused by the use of atol(), which is notoriously unportable
> (sizeof(long)).  So I poked around and found more places that might need
> fixing.  I'm attaching a patch here with annotations too look at later.

Yeah atoXX calls have been funky in the tree for some time.  This
reminds this thread, somewhat:
https://www.postgresql.org/message-id/CALAY4q8be6Qw_2J%3DzOp_v1X-zfMBzvVMkAfmMYv%3DUkr%3D2hPcFQ%40mail.gmail.com

The issue is also that there is no "safe" parsing alternative for 64b
integers in the frontend (as you know long is 32b in Windows, which is
why I'd encourage ripping it out as much as we can).  This may be
better as a complementary of strtoint() in src/common/string.c.  Note
as well strtoint64() in pgbench.c.  I think I have a patch lying
around, actually..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled
Next
From: Jeff Davis
Date:
Subject: Re: optimizing pg_upgrade's once-in-each-database steps