Skip to content

Commit 74a811e

Browse files
committed
The option --pgpro-version added, small corrections to previous patch, bugreport e-mail address changed to bugs@postgrespro.ru
1 parent d4b8539 commit 74a811e

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/bin/pg_config/pg_config.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,17 +380,17 @@ show_version(bool all)
380380
if (all)
381381
printf("VERSION = ");
382382
printf("PostgreSQL " PG_VERSION "\n");
383+
}
384+
383385
#ifdef PGPRO_VERSION
386+
static void
387+
show_pgpro_version(bool all)
388+
{
384389
if (all)
385-
{ /*
386-
For compatibility works only in ALL mode
387-
*/
388390
printf("PGPRO_VERSION = ");
389-
printf("PostgresPro " PGPRO_VERSION "\n");
390-
}
391-
#endif
391+
printf("PostgresPro " PGPRO_VERSION "\n");
392392
}
393-
393+
#endif
394394

395395
/*
396396
* Table of known information items
@@ -427,6 +427,9 @@ static const InfoItem info_items[] = {
427427
{"--ldflags_sl", show_ldflags_sl},
428428
{"--libs", show_libs},
429429
{"--version", show_version},
430+
#ifdef PGPRO_VERSION
431+
{"--pgpro-version", show_pgpro_version},
432+
#endif
430433
{NULL, NULL}
431434
};
432435

@@ -463,9 +466,16 @@ help(void)
463466
printf(_(" --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built\n"));
464467
printf(_(" --libs show LIBS value used when PostgreSQL was built\n"));
465468
printf(_(" --version show the PostgreSQL version\n"));
469+
#ifdef PGPRO_VERSION
470+
printf(_(" --pgpro-version show the PostgresPRO version\n"));
471+
#endif
466472
printf(_(" -?, --help show this help, then exit\n"));
467473
printf(_("\nWith no arguments, all known items are shown.\n\n"));
474+
#ifdef PGPRO_VERSION
475+
printf(_("Report bugs to <bugs@postgrespro.ru>.\n"));
476+
#else
468477
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
478+
#endif
469479
}
470480

471481
static void

0 commit comments

Comments
 (0)