diff options
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r-- | src/include/utils/guc.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index c4e9a44a3e8..f7361dff47e 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -4,7 +4,7 @@ * External declarations pertaining to backend/utils/misc/guc.c and * backend/utils/misc/guc-file.l * - * $Id: guc.h,v 1.13 2001/11/05 17:46:36 momjian Exp $ + * $Id: guc.h,v 1.14 2002/02/23 01:31:37 petere Exp $ */ #ifndef GUC_H #define GUC_H @@ -46,15 +46,32 @@ typedef enum PGC_USERSET } GucContext; +/* + * The following type records the source of the current setting. A + * new setting can only take effect if the previous setting had the + * same or lower level. (E.g, changing the config file doesn't + * override the postmaster command line.) + */ +typedef enum +{ + PGC_S_DEFAULT = 0, /* wired-in default */ + PGC_S_FILE = 1, /* postgresql.conf */ + PGC_S_ARGV = 2, /* postmaster command line */ + PGC_S_DATABASE = 3, /* per-database setting */ + PGC_S_USER = 4, /* per-user setting */ + PGC_S_CLIENT = 5, /* from client (PGOPTIONS) */ + PGC_S_SESSION = 6, /* SET command */ + PGC_S_INFINITY = 100 /* can be used to avoid checks */ +} GucSource; extern void SetConfigOption(const char *name, const char *value, - GucContext context, bool makeDefault); + GucContext context, GucSource source); extern const char *GetConfigOption(const char *name); extern void ProcessConfigFile(GucContext context); extern void ResetAllOptions(bool isStartup); extern void ParseLongOption(const char *string, char **name, char **value); extern bool set_config_option(const char *name, const char *value, - GucContext context, bool DoIt, bool makeDefault); + GucContext context, bool DoIt, GucSource source); extern void ShowAllGUCConfig(void); |