pgsql: Limit max parameter number with MaxAllocSize

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Limit max parameter number with MaxAllocSize
Date: 2024-07-02 07:38:10
Message-ID: E1sOY5Y-0000Q2-Sg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Limit max parameter number with MaxAllocSize

MaxAllocSize puts an upper bound on the largest possible parameter
number ($268435455). Use that limit instead of INT_MAX to report that
no parameters exist beyond that point instead of reporting an error
about the maximum allocation size being exceeded.

Author: Erik Wienhold <ewie(at)ewie(dot)name>
Discussion: https://www.postgresql.org/message-id/flat/5d216d1c-91f6-4cbe-95e2-b4cbd930520c(at)ewie(dot)name

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c2e660b07fc16bdd79c25047cce6cde2acb3f37

Modified Files
--------------
src/backend/parser/parse_param.c | 3 ++-
src/test/regress/expected/prepare.out | 5 +++++
src/test/regress/sql/prepare.sql | 3 +++
3 files changed, 10 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-07-02 08:44:44 pgsql: Remove too demanding test
Previous Message Amit Kapila 2024-07-02 06:21:07 pgsql: Drop pre-existing subscriptions from the converted subscriber.