aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/guc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r--src/include/utils/guc.h50
1 files changed, 49 insertions, 1 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index ca1f87b1fe1..707dca33910 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -7,7 +7,7 @@
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
- * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.45 2004/04/07 05:05:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.46 2004/05/26 15:07:41 momjian Exp $
*--------------------------------------------------------------------
*/
#ifndef GUC_H
@@ -102,6 +102,15 @@ typedef enum
PGC_S_SESSION /* SET command */
} GucSource;
+typedef const char* (*GucStringAssignHook)(const char *newval, bool doit, GucSource source);
+typedef bool (*GucBoolAssignHook)(bool newval, bool doit, GucSource source);
+typedef bool (*GucIntAssignHook)(int newval, bool doit, GucSource source);
+typedef bool (*GucRealAssignHook)(double newval, bool doit, GucSource source);
+
+typedef const char* (*GucShowHook)(void);
+
+#define GUC_QUALIFIER_SEPARATOR '.'
+
/* GUC vars that are actually declared in guc.c, rather than elsewhere */
extern bool log_duration;
extern bool Debug_print_plan;
@@ -129,6 +138,45 @@ extern int log_min_duration_statement;
extern void SetConfigOption(const char *name, const char *value,
GucContext context, GucSource source);
+
+extern void DefineCustomBoolVariable(
+ const char* name,
+ const char* short_desc,
+ const char* long_desc,
+ bool* valueAddr,
+ GucContext context,
+ GucBoolAssignHook assign_hook,
+ GucShowHook show_hook);
+
+extern void DefineCustomIntVariable(
+ const char* name,
+ const char* short_desc,
+ const char* long_desc,
+ int* valueAddr,
+ GucContext context,
+ GucIntAssignHook assign_hook,
+ GucShowHook show_hook);
+
+extern void DefineCustomRealVariable(
+ const char* name,
+ const char* short_desc,
+ const char* long_desc,
+ double* valueAddr,
+ GucContext context,
+ GucRealAssignHook assign_hook,
+ GucShowHook show_hook);
+
+extern void DefineCustomStringVariable(
+ const char* name,
+ const char* short_desc,
+ const char* long_desc,
+ char** valueAddr,
+ GucContext context,
+ GucStringAssignHook assign_hook,
+ GucShowHook show_hook);
+
+extern void EmittWarningsOnPlaceholders(const char* className);
+
extern const char *GetConfigOption(const char *name);
extern const char *GetConfigOptionResetString(const char *name);
extern void ProcessConfigFile(GucContext context);