From 9bb257a65214ff839dfd724f9319b21b089dd2c9 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 3 Dec 2000 14:36:47 +0000 Subject: [PATCH] Final(?) GUC clean-up. Update psql tab completion. --- doc/src/sgml/runtime.sgml | 26 +++++++++++++------------- src/backend/utils/misc/guc.c | 6 +++--- src/bin/psql/tab-complete.c | 28 ++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index e8ef4711ae..79758cdfdd 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -638,7 +638,7 @@ env PGOPTIONS='-c geqo=off' psql - GEQO_RELS (integer) + GEQO_THRESHOLD (integer) Only use genetic query optimization for queries with at least @@ -751,7 +751,7 @@ env PGOPTIONS='-c geqo=off' psql - HOSTLOOKUP (boolean) + HOSTNAME_LOOKUP (boolean) By default, connection logs only show the IP address of the @@ -811,14 +811,14 @@ env PGOPTIONS='-c geqo=off' psql - SHOWPORTNUMBER (boolean) + SHOW_SOURCE_PORT (boolean) - Shows the port number of the connecting host in the connection - log messages. You could trace back the port number to find out - what user initiated the connection. Other than that it's - pretty useless and therefore off by default. This option can - only be set at server start. + Shows the outgoing port number of the connecting host in the + connection log messages. You could trace back the port number + to find out what user initiated the connection. Other than + that it's pretty useless and therefore off by default. This + option can only be set at server start. @@ -1015,12 +1015,12 @@ env PGOPTIONS='-c geqo=off' psql SILENT_MODE (bool) - Runs postmaster silently. If this option is set, postmaser + Runs postmaster silently. If this option is set, postmaster will automatically run in background and any controlling ttys - are disassociated, thus no message is put to stdout or - stderr(same effect as postmaster's -S option). Unless some - logging systems such as syslog is enabled, using this option - is discouraged since it makes difficult to find error + are disassociated, thus no messages are written to stdout or + stderr (same effect as postmaster's -S option). Unless some + logging system such as syslog is enabled, using this option is + discouraged since it makes it impossible to see error messages. diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index b5c390cb3f..eb7529d254 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -207,8 +207,8 @@ ConfigureNamesBool[] = {"debug_deadlocks", PGC_SUSET, &Debug_deadlocks, false}, #endif - {"hostlookup", PGC_SIGHUP, &HostnameLookup, false}, - {"showportnumber", PGC_SIGHUP, &ShowPortNumber, false}, + {"hostname_lookup", PGC_SIGHUP, &HostnameLookup, false}, + {"show_source_port", PGC_SIGHUP, &ShowPortNumber, false}, {"sql_inheritance", PGC_USERSET, &SQL_inheritance, true}, @@ -219,7 +219,7 @@ ConfigureNamesBool[] = static struct config_int ConfigureNamesInt[] = { - {"geqo_rels", PGC_USERSET, &geqo_rels, + {"geqo_threshold", PGC_USERSET, &geqo_rels, DEFAULT_GEQO_RELS, 2, INT_MAX}, {"geqo_pool_size", PGC_USERSET, &Geqo_pool_size, DEFAULT_GEQO_POOL_SIZE, 0, MAX_GEQO_POOL_SIZE}, diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index ca5f6305eb..7717d2d8e8 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -201,6 +201,7 @@ psql_completion(char *text, int start, int end) /* these SET arguments are known in gram.y */ "CONSTRAINTS", "NAMES", + "SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL", "TRANSACTION ISOLATION LEVEL", /* these are treated in backend/commands/variable.c */ "DateStyle", @@ -208,9 +209,7 @@ psql_completion(char *text, int start, int end) "client_encoding", "server_encoding", "random_seed", - /* the rest should match USERSET and SUSET entries in - * backend/utils/misc/guc.c, but feel free to leave out the - * esoteric or debug settings */ + /* the rest should match USERSET entries in backend/utils/misc/guc.c */ "enable_seqscan", "enable_indexscan", "enable_tidscan", @@ -220,15 +219,36 @@ psql_completion(char *text, int start, int end) "enable_hashjoin", "geqo", "ksqo", + "fsync", + "debug_assertions", + "debug_print_query", + "debug_print_parse", + "debug_print_rewritten", + "debug_print_plan", + "debug_pretty_print", + "show_parser_stats", + "show_planner_stats", + "show_executor_stats", + "show_query_stats", + "trace_notify", "sql_inheritance", + + "geqo_threshold", + "geqo_pool_size", + "geqo_effort", + "geqo_generations", + "geqo_random_seed", "sort_mem", "debug_level", "max_expr_depth", + "commit_delay", + "effective_cache_size", "random_page_cost", "cpu_tuple_cost", "cpu_index_tuple_cost", "cpu_operator_cost", + "geqo_selection_bias", NULL }; @@ -592,7 +612,7 @@ psql_completion(char *text, int start, int end) strcasecmp(prev2_wd, "TRANSACTION") == 0 && strcasecmp(prev_wd, "ISOLATION") == 0) COMPLETE_WITH_CONST("LEVEL"); - else if (strcasecmp(prev4_wd, "SET") == 0 && + else if ((strcasecmp(prev4_wd, "SET") == 0 || strcasecmp(prev4_wd, "AS") == 0) && strcasecmp(prev3_wd, "TRANSACTION") == 0 && strcasecmp(prev2_wd, "ISOLATION") == 0 && strcasecmp(prev_wd, "LEVEL") == 0) -- 2.39.5