Skip to content

Commit 519cef2

Browse files
committed
Add missing min/max parameters to DefineCustomIntVariable() and
DefineCustomRealVariable(). Thomas Hallgren
1 parent 6e26c00 commit 519cef2

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.256 2005/03/19 23:27:07 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.257 2005/03/25 16:17:27 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -4187,6 +4187,8 @@ DefineCustomIntVariable(
41874187
const char *short_desc,
41884188
const char *long_desc,
41894189
int *valueAddr,
4190+
int minValue,
4191+
int maxValue,
41904192
GucContext context,
41914193
GucIntAssignHook assign_hook,
41924194
GucShowHook show_hook)
@@ -4199,6 +4201,8 @@ DefineCustomIntVariable(
41994201

42004202
var->variable = valueAddr;
42014203
var->reset_val = *valueAddr;
4204+
var->min = minValue;
4205+
var->max = maxValue;
42024206
var->assign_hook = assign_hook;
42034207
var->show_hook = show_hook;
42044208
define_custom_variable(&var->gen);
@@ -4210,6 +4214,8 @@ DefineCustomRealVariable(
42104214
const char *short_desc,
42114215
const char *long_desc,
42124216
double *valueAddr,
4217+
double minValue,
4218+
double maxValue,
42134219
GucContext context,
42144220
GucRealAssignHook assign_hook,
42154221
GucShowHook show_hook)
@@ -4222,6 +4228,8 @@ DefineCustomRealVariable(
42224228

42234229
var->variable = valueAddr;
42244230
var->reset_val = *valueAddr;
4231+
var->min = minValue;
4232+
var->max = maxValue;
42254233
var->assign_hook = assign_hook;
42264234
var->show_hook = show_hook;
42274235
define_custom_variable(&var->gen);

src/include/utils/guc.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
88
* Written by Peter Eisentraut <peter_e@gmx.net>.
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.59 2005/03/19 23:27:11 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.60 2005/03/25 16:17:28 tgl Exp $
1111
*--------------------------------------------------------------------
1212
*/
1313
#ifndef GUC_H
@@ -151,6 +151,8 @@ extern void DefineCustomIntVariable(
151151
const char *short_desc,
152152
const char *long_desc,
153153
int *valueAddr,
154+
int minValue,
155+
int maxValue,
154156
GucContext context,
155157
GucIntAssignHook assign_hook,
156158
GucShowHook show_hook);
@@ -160,6 +162,8 @@ extern void DefineCustomRealVariable(
160162
const char *short_desc,
161163
const char *long_desc,
162164
double *valueAddr,
165+
double minValue,
166+
double maxValue,
163167
GucContext context,
164168
GucRealAssignHook assign_hook,
165169
GucShowHook show_hook);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy