diff options
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r-- | src/include/utils/guc.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index ffe1168ccc1..49ec3840af3 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -121,26 +121,36 @@ typedef enum } GucSource; /* - * Parsing the configuration file will return a list of name-value pairs - * with source location info. + * Parsing the configuration file(s) will return a list of name-value pairs + * with source location info. We also abuse this data structure to carry + * error reports about the config files. An entry reporting an error will + * have errmsg != NULL, and might have NULLs for name, value, and/or filename. + * + * If "ignore" is true, don't attempt to apply the item (it might be an error + * report, or an item we determined to be duplicate). "applied" is set true + * if we successfully applied, or could have applied, the setting. */ typedef struct ConfigVariable { char *name; char *value; + char *errmsg; char *filename; int sourceline; + bool ignore; + bool applied; struct ConfigVariable *next; } ConfigVariable; -extern bool ParseConfigFile(const char *config_file, const char *calling_file, - bool strict, int depth, int elevel, +extern bool ParseConfigFile(const char *config_file, bool strict, + const char *calling_file, int calling_lineno, + int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p); extern bool ParseConfigFp(FILE *fp, const char *config_file, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p); extern bool ParseConfigDirectory(const char *includedir, - const char *calling_file, + const char *calling_file, int calling_lineno, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p); |