Re: Underscore in positional parameters?

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: Erik Wienhold <ewie@ewie.name>, Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter@eisentraut.org>, Tom Lane <tgl@sss.pgh.pa.us>, Dean Rasheed <dean.a.rasheed@gmail.com>, pgsql-hackers@postgresql.org
Date: 2024-05-19T05:00:00Z
Lists: pgsql-hackers
Hello Erik,

18.05.2024 04:31, Erik Wienhold wrote:
> On 2024-05-17 02:06 +0200, Michael Paquier wrote:
>> 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.
> Done in v3.

Thank you for working on this!

I encountered anomalies that you address with this patch too.
And I can confirm that it fixes most cases, but there is another one:
SELECT $300000000 \bind 'foo' \g
ERROR:  invalid memory alloc request size 1200000000

Maybe you would find this worth fixing as well.

Best regards,
Alexander



Commits

  1. Fix overflow in parsing of positional parameter

  2. Limit max parameter number with MaxAllocSize

  3. Re-forbid underscore in positional parameters