diff options
| author | Bruce Momjian | 2006-08-11 20:08:28 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2006-08-11 20:08:28 +0000 |
| commit | f91ddb768b9d29bec1b7c2e039a5d2e55a25dd2c (patch) | |
| tree | 6f87dfe05f6f67fe2772431f46fc1f19399a83bb /src/include | |
| parent | c07fbcf57701a26dfafd44ebe3edc4070fa6c6d0 (diff) | |
Refactor GUC set_config_option function:
The main reason for refactoring was that set_config_option() was too
overloaded function and its behavior did not consistent. Old version of
set_config_function hides some messages. For example if you type:
tcp_port = 5432.1
then old implementation ignore this error without any message to log
file in the signal context (configuration reload). Main problem was that
semantic analysis of postgresql.conf is not perform in the
ProcessConfigFile function, but in the set_config_options *after*
context check. This skipped check for variables with PG_POSTMASTER
context. There was request from Joachim Wieland to add more messages
about ignored changes in the config file as well.
Zdenek Kotala
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/guc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 3c2ebe2ac4d..f5bbf813122 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -7,7 +7,7 @@ * Copyright (c) 2000-2006, PostgreSQL Global Development Group * Written by Peter Eisentraut <peter_e@gmx.net>. * - * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.71 2006/07/29 03:02:56 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.72 2006/08/11 20:08:28 momjian Exp $ *-------------------------------------------------------------------- */ #ifndef GUC_H @@ -193,6 +193,9 @@ extern void ParseLongOption(const char *string, char **name, char **value); extern bool set_config_option(const char *name, const char *value, GucContext context, GucSource source, bool isLocal, bool changeVal); +extern bool verify_config_option(const char *name, const char *value, + GucContext context, GucSource source, + bool *isNewEqual, bool *isContextOK); extern char *GetConfigOptionByName(const char *name, const char **varname); extern void GetConfigOptionByNum(int varnum, const char **values, bool *noshow); extern int GetNumConfigOptions(void); |
