Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ead119

Browse files
committed
bugfix: print "version" command output to stdout instead of stderr
1 parent 46f875b commit 7ead119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pg_probackup.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,11 @@ main(int argc, char *argv[])
323323
|| strcmp(argv[1], "-V") == 0)
324324
{
325325
#ifdef PGPRO_VERSION
326-
fprintf(stderr, "%s %s (Postgres Pro %s %s)\n",
326+
fprintf(stdout, "%s %s (Postgres Pro %s %s)\n",
327327
PROGRAM_NAME, PROGRAM_VERSION,
328328
PGPRO_VERSION, PGPRO_EDITION);
329329
#else
330-
fprintf(stderr, "%s %s (PostgreSQL %s)\n",
330+
fprintf(stdout, "%s %s (PostgreSQL %s)\n",
331331
PROGRAM_NAME, PROGRAM_VERSION, PG_VERSION);
332332
#endif
333333
exit(0);

0 commit comments

Comments
 (0)