diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/guc.h | 22 | ||||
| -rw-r--r-- | src/include/utils/guc_tables.h | 11 |
2 files changed, 22 insertions, 11 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 43c37eb4ff..4c80da7d08 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -7,7 +7,7 @@ * Copyright (c) 2000-2008, PostgreSQL Global Development Group * Written by Peter Eisentraut <peter_e@gmx.net>. * - * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.91 2008/03/10 12:55:13 mha Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.92 2008/03/16 16:42:44 mha Exp $ *-------------------------------------------------------------------- */ #ifndef GUC_H @@ -93,6 +93,16 @@ typedef enum PGC_S_SESSION /* SET command */ } GucSource; +/* + * Enum values are made up of an array of name-value pairs + */ +struct config_enum_entry +{ + const char *name; + int val; +}; + + 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); @@ -189,6 +199,16 @@ extern void DefineCustomStringVariable( GucStringAssignHook assign_hook, GucShowHook show_hook); +extern void DefineCustomEnumVariable( + const char *name, + const char *short_desc, + const char *long_desc, + int *valueAddr, + const struct config_enum_entry *options, + GucContext context, + GucEnumAssignHook assign_hook, + GucShowHook show_hook); + extern void EmitWarningsOnPlaceholders(const char *className); extern const char *GetConfigOption(const char *name); diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index 2b8d8e6e3e..f81826fe4c 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -7,7 +7,7 @@ * * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.39 2008/03/10 12:55:13 mha Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.40 2008/03/16 16:42:44 mha Exp $ * *------------------------------------------------------------------------- */ @@ -38,15 +38,6 @@ union config_var_value }; /* - * Enum values are made up of an array of name-value pairs - */ -struct config_enum_entry -{ - const char *name; - int val; -}; - -/* * Groupings to help organize all the run-time options for display */ enum config_group |
