From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fixup some appendStringInfo and appendPQExpBuffer calls
Date: Thu, 15 Oct 2020 07:36:24 +0000
Message-ID: <E1kSxoG-0007OH-Vi@gemulon.postgresql.org> (raw)
Fixup some appendStringInfo and appendPQExpBuffer calls
A number of places were using appendStringInfo() when they could have been
using appendStringInfoString() instead. While there's no functionality
change there, it's just more efficient to use appendStringInfoString()
when no formatting is required. Likewise for some
appendStringInfoString() calls which were just appending a single char.
We can just use appendStringInfoChar() for that.
Additionally, many places were using appendPQExpBuffer() when they could
have used appendPQExpBufferStr(). Change those too.
Patch by Zhijie Hou, but further searching by me found significantly more
places that deserved the same treatment.
Author: Zhijie Hou, David Rowley
Discussion: https://postgr.es/m/cb172cf4361e4c7ba7167429070979d4@G08CNEXMBPEKD05.g08.fujitsu.local
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/110d81728a0a006abcf654543fc15346f8043dc0
Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 4 +-
contrib/test_decoding/test_decoding.c | 12 +-
src/backend/access/rmgrdesc/dbasedesc.c | 2 +-
src/backend/commands/explain.c | 16 +-
src/backend/replication/backup_manifest.c | 6 +-
.../libpqwalreceiver/libpqwalreceiver.c | 2 +-
src/backend/replication/logical/tablesync.c | 2 +-
src/backend/utils/adt/jsonpath.c | 2 +-
src/backend/utils/adt/ri_triggers.c | 2 +-
src/backend/utils/adt/ruleutils.c | 4 +-
src/bin/pg_dump/pg_dump.c | 228 ++++++++++-----------
src/bin/pg_upgrade/version.c | 44 ++--
src/bin/psql/describe.c | 56 +++--
src/bin/scripts/reindexdb.c | 44 ++--
src/pl/plpython/plpy_elog.c | 2 +-
15 files changed, 210 insertions(+), 216 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: drowley@postgresql.org
Subject: Re: pgsql: Fixup some appendStringInfo and appendPQExpBuffer calls
In-Reply-To: <E1kSxoG-0007OH-Vi@gemulon.postgresql.org>
References: <E1kSxoG-0007OH-Vi@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