From 2075ba9dc9af8833b1147996c15246e44a1e4fab Mon Sep 17 00:00:00 2001 From: David Rowley Date: Tue, 3 Oct 2023 17:09:52 +1300 Subject: Tidy-up some appendStringInfo*() usages Make a few newish calls to appendStringInfo() which have no special formatting use appendStringInfoString() instead. Also, adjust usages of appendStringInfoString() which only append a string containing a single character to make use of appendStringInfoChar() instead. This makes the code marginally faster, but primarily this change is so we use the StringInfo type as it was intended to be used. Discussion: https://postgr.es/m/CAApHDvpXKQmL+r=VDNS98upqhr9yGBhv2Jw3GBFFk_wKHcB39A@mail.gmail.com --- src/backend/access/transam/xlogbackup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access/transam/xlogbackup.c') diff --git a/src/backend/access/transam/xlogbackup.c b/src/backend/access/transam/xlogbackup.c index 23461c9d2ca..21d68133ae1 100644 --- a/src/backend/access/transam/xlogbackup.c +++ b/src/backend/access/transam/xlogbackup.c @@ -58,7 +58,7 @@ build_backup_content(BackupState *state, bool ishistoryfile) appendStringInfo(result, "CHECKPOINT LOCATION: %X/%X\n", LSN_FORMAT_ARGS(state->checkpointloc)); - appendStringInfo(result, "BACKUP METHOD: streamed\n"); + appendStringInfoString(result, "BACKUP METHOD: streamed\n"); appendStringInfo(result, "BACKUP FROM: %s\n", state->started_in_recovery ? "standby" : "primary"); appendStringInfo(result, "START TIME: %s\n", startstrbuf); -- cgit v1.2.3