From 8449f31ce76693980aed57712b10f573271f9c1e Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 28 Nov 2019 13:51:25 +0100 Subject: [PATCH] Strip trailing spaces from output --- pg_filedump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pg_filedump.c b/pg_filedump.c index 80bd6e7..07cbe82 100644 --- a/pg_filedump.c +++ b/pg_filedump.c @@ -794,7 +794,8 @@ CreateDumpFileHeader(int numOptions, char **options) if ((strlen(optionBuffer) + strlen(options[x])) > 50) break; strcat(optionBuffer, options[x]); - strcat(optionBuffer, " "); + if (x < numOptions - 2) + strcat(optionBuffer, " "); } printf @@ -973,7 +974,7 @@ FormatItemBlock(char *buffer, return; if (!isToast || verbose) - printf("%s ------ \n", indent); + printf("%s -----\n", indent); /* Loop through the items on the block. Check if the block is * empty and has a sensible item array listed before running -- 2.39.5