1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

Add --help-config facility to dump information about GUC parameters

without needing a running backend.  Reorder postgresql.conf.sample
to match new layout of runtime.sgml.  This commit re-adds work lost
in Wednesday's crash.
This commit is contained in:
Tom Lane
2003-07-04 16:41:22 +00:00
parent efbbd107c7
commit b700a672fe
10 changed files with 1912 additions and 699 deletions

View File

@@ -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.
@@ -218,6 +219,14 @@ main(int argc, char *argv[])
if (argc > 1 && strcmp(new_argv[1], "-boot") == 0)
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