From: Tom Lane Date: Fri, 25 Mar 2005 16:17:39 +0000 (+0000) Subject: Add missing min/max parameters to DefineCustomIntVariable() and X-Git-Tag: REL8_0_2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f87592fce7ebf14dff9be24141f360f2129f9292;p=thirdparty%2Fpostgresql.git Add missing min/max parameters to DefineCustomIntVariable() and DefineCustomRealVariable(). Thomas Hallgren --- diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 053bd2af3f9..9038f660476 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.252 2005/01/01 05:43:08 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.252.4.1 2005/03/25 16:17:38 tgl Exp $ * *-------------------------------------------------------------------- */ @@ -4168,6 +4168,8 @@ DefineCustomIntVariable( const char *short_desc, const char *long_desc, int *valueAddr, + int minValue, + int maxValue, GucContext context, GucIntAssignHook assign_hook, GucShowHook show_hook) @@ -4180,6 +4182,8 @@ DefineCustomIntVariable( var->variable = valueAddr; var->reset_val = *valueAddr; + var->min = minValue; + var->max = maxValue; var->assign_hook = assign_hook; var->show_hook = show_hook; define_custom_variable(&var->gen); @@ -4191,6 +4195,8 @@ DefineCustomRealVariable( const char *short_desc, const char *long_desc, double *valueAddr, + double minValue, + double maxValue, GucContext context, GucRealAssignHook assign_hook, GucShowHook show_hook) @@ -4203,6 +4209,8 @@ DefineCustomRealVariable( var->variable = valueAddr; var->reset_val = *valueAddr; + var->min = minValue; + var->max = maxValue; var->assign_hook = assign_hook; var->show_hook = show_hook; define_custom_variable(&var->gen); diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index c3473e2fc31..458cc49172a 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -7,7 +7,7 @@ * Copyright (c) 2000-2005, PostgreSQL Global Development Group * Written by Peter Eisentraut . * - * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.58 2005/01/01 05:43:09 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.58.4.1 2005/03/25 16:17:39 tgl Exp $ *-------------------------------------------------------------------- */ #ifndef GUC_H @@ -149,6 +149,8 @@ extern void DefineCustomIntVariable( const char *short_desc, const char *long_desc, int *valueAddr, + int minValue, + int maxValue, GucContext context, GucIntAssignHook assign_hook, GucShowHook show_hook); @@ -158,6 +160,8 @@ extern void DefineCustomRealVariable( const char *short_desc, const char *long_desc, double *valueAddr, + double minValue, + double maxValue, GucContext context, GucRealAssignHook assign_hook, GucShowHook show_hook);