Fixup some appendStringInfo and appendPQExpBuffer calls
authorDavid Rowley <[email protected]>
Thu, 15 Oct 2020 07:35:17 +0000 (20:35 +1300)
committerDavid Rowley <[email protected]>
Thu, 15 Oct 2020 07:35:17 +0000 (20:35 +1300)
commit110d81728a0a006abcf654543fc15346f8043dc0
treeeb0caef08d002a3bc627bcb8de2e5b1d65925abc
parent73c381cee71e7dd8a78a394731958b0bbb4d8991
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
15 files changed:
contrib/postgres_fdw/postgres_fdw.c
contrib/test_decoding/test_decoding.c
src/backend/access/rmgrdesc/dbasedesc.c
src/backend/commands/explain.c
src/backend/replication/backup_manifest.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/logical/tablesync.c
src/backend/utils/adt/jsonpath.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/ruleutils.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_upgrade/version.c
src/bin/psql/describe.c
src/bin/scripts/reindexdb.c
src/pl/plpython/plpy_elog.c