pgsql: Fixup some appendStringInfo and appendPQExpBuffer calls

Поиск
Список
Период
Сортировка
От David Rowley
Тема pgsql: Fixup some appendStringInfo and appendPQExpBuffer calls
Дата
Msg-id E1kSxoG-0007OH-Vi@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: postgres_fdw: reestablish new connection if cached one is detect
Следующее
От: Fujii Masao
Дата:
Сообщение: pgsql: Improve tab-completion for FETCH/MOVE.