From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace formatting.c's fixed-size output buffers with StringInfo
Date: Thu, 20 Aug 2026 17:01:34 +0000
Message-ID: <E1wx68z-00000001NzS-3KdF@gemulon.postgresql.org> (raw)
Replace formatting.c's fixed-size output buffers with StringInfos.
In both versions of NUM_processor(), use a StringInfo for the
output string, eliminating the need to guess an upper bound
for the output length, and removing the need to truncate some
strings of unpredictable length.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/3451175.1786641871@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ec352b37d88a12f0256526ff0a51bd86d587d604
Modified Files
--------------
src/backend/utils/adt/formatting.c | 310 +++++++++++++++----------------------
1 file changed, 127 insertions(+), 183 deletions(-)
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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Replace formatting.c's fixed-size output buffers with StringInfo
In-Reply-To: <E1wx68z-00000001NzS-3KdF@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox