Strip trailing spaces from output
authorChristoph Berg <[email protected]>
Thu, 28 Nov 2019 12:51:25 +0000 (13:51 +0100)
committerChristoph Berg <[email protected]>
Thu, 28 Nov 2019 12:51:52 +0000 (13:51 +0100)
pg_filedump.c

index 80bd6e7ffd1141ed7fb49dee6094894632ab9985..07cbe82d2c0547c5efb5a3f8c8e03ec12a0f5faf 100644 (file)
@@ -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<Data> -----\n", indent);
+               printf("%s<Data> -----\n", indent);
 
        /* Loop through the items on the block.  Check if the block is
         * empty and has a sensible item array listed before running