agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Jacob Champion <jchampion@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add pg_add_size_overflow() and friends
Date: Mon, 24 Nov 2025 20:24:28 +0000
Message-ID: <E1vNd6p-001E3S-23@gemulon.postgresql.org> (raw)
Add pg_add_size_overflow() and friends
Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.
pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8934f2136cd82333fd148954a13a8ab01f7bd7ef
Modified Files
--------------
src/include/common/int.h | 67 +++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/fe-exec.c | 44 +++++++-----------------
src/interfaces/libpq/fe-print.c | 36 +++++---------------
src/interfaces/libpq/fe-protocol3.c | 27 +++------------
4 files changed, 91 insertions(+), 83 deletions(-)
view thread (6+ messages) latest in thread
Message-ID: <E1vNd6p-001E3S-23@gemulon.postgresql.org>
Permalink: ../E1vNd6p-001E3S-23@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1vNd6p-001E3S-23@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jchampion@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add pg_add_size_overflow() and friends
In-Reply-To: <E1vNd6p-001E3S-23@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox