aboutsummaryrefslogtreecommitdiff
path: root/src/backend/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/main/main.c')
-rw-r--r--src/backend/main/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index c86b45b132f..e03633a3261 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.57 2003/05/15 16:35:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.58 2003/07/04 16:41:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,6 +37,7 @@
#include "miscadmin.h"
#include "bootstrap/bootstrap.h"
#include "tcop/tcopprot.h"
+#include "utils/help_config.h"
#include "utils/ps_status.h"
@@ -198,7 +199,7 @@ main(int argc, char *argv[])
}
/*
- * Now dispatch to one of PostmasterMain, PostgresMain, or
+ * Now dispatch to one of PostmasterMain, PostgresMain, GucInfoMain, or
* BootstrapMain depending on the program name (and possibly first
* argument) we were called with. The lack of consistency here is
* historical.
@@ -219,6 +220,14 @@ main(int argc, char *argv[])
exit(BootstrapMain(argc - 1, new_argv + 1));
/*
+ * If the first argument is "--help-config", then invoke runtime
+ * configuration option display mode.
+ * We remove "--help-config" from the arguments passed on to GucInfoMain.
+ */
+ if (argc > 1 && strcmp(new_argv[1], "--help-config") == 0)
+ exit(GucInfoMain(argc - 1, new_argv + 1));
+
+ /*
* Otherwise we're a standalone backend. Invoke PostgresMain,
* specifying current userid as the "authenticated" Postgres user
* name.