Skip to content

Commit 11c2f19

Browse files
committed
Rename DoIt to changeVar, for clarity.
1 parent defc7a9 commit 11c2f19

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

src/backend/utils/misc/guc.c

Lines changed: 26 additions & 26 deletions
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-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.151 2003/08/26 15:38:25 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.152 2003/09/01 04:15:50 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -2373,7 +2373,7 @@ parse_real(const char *value, double *result)
23732373
* properly.
23742374
*
23752375
* If value is NULL, set the option to its default value. If the
2376-
* parameter DoIt is false then don't really set the option but do all
2376+
* parameter changeVal is false then don't really set the option but do all
23772377
* the checks to see if it would work.
23782378
*
23792379
* If there is an error (non-existing option, invalid value) then an
@@ -2390,13 +2390,13 @@ parse_real(const char *value, double *result)
23902390
bool
23912391
set_config_option(const char *name, const char *value,
23922392
GucContext context, GucSource source,
2393-
bool isLocal, bool DoIt)
2393+
bool isLocal, bool changeVal)
23942394
{
23952395
struct config_generic *record;
23962396
int elevel;
23972397
bool interactive;
23982398
bool makeDefault;
2399-
bool DoIt_orig;
2399+
bool changeVal_orig;
24002400

24012401
if (context == PGC_SIGHUP || source == PGC_S_DEFAULT)
24022402
elevel = DEBUG2;
@@ -2511,26 +2511,26 @@ set_config_option(const char *name, const char *value,
25112511
* Should we set reset/session values? (If so, the behavior is not
25122512
* transactional.)
25132513
*/
2514-
makeDefault = DoIt && (source <= PGC_S_OVERRIDE) && (value != NULL);
2514+
makeDefault = changeVal && (source <= PGC_S_OVERRIDE) && (value != NULL);
25152515

25162516
/*
25172517
* Ignore attempted set if overridden by previously processed setting.
2518-
* However, if DoIt is false then plow ahead anyway since we are
2518+
* However, if changeVal is false then plow ahead anyway since we are
25192519
* trying to find out if the value is potentially good, not actually
25202520
* use it. Also keep going if makeDefault is true, since we may want
25212521
* to set the reset/session values even if we can't set the variable
25222522
* itself.
25232523
*/
2524-
DoIt_orig = DoIt; /* we might have to reverse this later */
2524+
changeVal_orig = changeVal; /* we might have to reverse this later */
25252525
if (record->source > source)
25262526
{
2527-
if (DoIt && !makeDefault)
2527+
if (changeVal && !makeDefault)
25282528
{
25292529
elog(DEBUG3, "\"%s\": setting ignored because previous source is higher priority",
25302530
name);
25312531
return true;
25322532
}
2533-
DoIt = false; /* we won't change the variable itself */
2533+
changeVal = false; /* we won't change the variable itself */
25342534
}
25352535

25362536
/*
@@ -2572,7 +2572,7 @@ set_config_option(const char *name, const char *value,
25722572
record->session_source > PGC_S_UNPRIVILEGED &&
25732573
newval > conf->session_val &&
25742574
!superuser())
2575-
DoIt = DoIt_orig;
2575+
changeVal = changeVal_orig;
25762576
}
25772577
else
25782578
{
@@ -2581,7 +2581,7 @@ set_config_option(const char *name, const char *value,
25812581
}
25822582

25832583
if (conf->assign_hook)
2584-
if (!(*conf->assign_hook) (newval, DoIt, interactive))
2584+
if (!(*conf->assign_hook) (newval, changeVal, interactive))
25852585
{
25862586
ereport(elevel,
25872587
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -2590,9 +2590,9 @@ set_config_option(const char *name, const char *value,
25902590
return false;
25912591
}
25922592

2593-
if (DoIt || makeDefault)
2593+
if (changeVal || makeDefault)
25942594
{
2595-
if (DoIt)
2595+
if (changeVal)
25962596
{
25972597
*conf->variable = newval;
25982598
conf->gen.source = source;
@@ -2669,7 +2669,7 @@ set_config_option(const char *name, const char *value,
26692669
record->session_source > PGC_S_UNPRIVILEGED &&
26702670
newval < conf->session_val &&
26712671
!superuser())
2672-
DoIt = DoIt_orig;
2672+
changeVal = changeVal_orig;
26732673
}
26742674
else
26752675
{
@@ -2678,7 +2678,7 @@ set_config_option(const char *name, const char *value,
26782678
}
26792679

26802680
if (conf->assign_hook)
2681-
if (!(*conf->assign_hook) (newval, DoIt, interactive))
2681+
if (!(*conf->assign_hook) (newval, changeVal, interactive))
26822682
{
26832683
ereport(elevel,
26842684
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -2687,9 +2687,9 @@ set_config_option(const char *name, const char *value,
26872687
return false;
26882688
}
26892689

2690-
if (DoIt || makeDefault)
2690+
if (changeVal || makeDefault)
26912691
{
2692-
if (DoIt)
2692+
if (changeVal)
26932693
{
26942694
*conf->variable = newval;
26952695
conf->gen.source = source;
@@ -2765,7 +2765,7 @@ set_config_option(const char *name, const char *value,
27652765
record->session_source > PGC_S_UNPRIVILEGED &&
27662766
newval < conf->session_val &&
27672767
!superuser())
2768-
DoIt = DoIt_orig;
2768+
changeVal = changeVal_orig;
27692769
}
27702770
else
27712771
{
@@ -2774,7 +2774,7 @@ set_config_option(const char *name, const char *value,
27742774
}
27752775

27762776
if (conf->assign_hook)
2777-
if (!(*conf->assign_hook) (newval, DoIt, interactive))
2777+
if (!(*conf->assign_hook) (newval, changeVal, interactive))
27782778
{
27792779
ereport(elevel,
27802780
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -2783,9 +2783,9 @@ set_config_option(const char *name, const char *value,
27832783
return false;
27842784
}
27852785

2786-
if (DoIt || makeDefault)
2786+
if (changeVal || makeDefault)
27872787
{
2788-
if (DoIt)
2788+
if (changeVal)
27892789
{
27902790
*conf->variable = newval;
27912791
conf->gen.source = source;
@@ -2863,7 +2863,7 @@ set_config_option(const char *name, const char *value,
28632863
record->session_source > PGC_S_UNPRIVILEGED &&
28642864
newval < conf->session_val &&
28652865
!superuser())
2866-
DoIt = DoIt_orig;
2866+
changeVal = changeVal_orig;
28672867
}
28682868
}
28692869
else if (conf->reset_val)
@@ -2902,7 +2902,7 @@ set_config_option(const char *name, const char *value,
29022902
const char *hookresult;
29032903

29042904
hookresult = (*conf->assign_hook) (newval,
2905-
DoIt, interactive);
2905+
changeVal, interactive);
29062906
guc_string_workspace = NULL;
29072907
if (hookresult == NULL)
29082908
{
@@ -2932,9 +2932,9 @@ set_config_option(const char *name, const char *value,
29322932

29332933
guc_string_workspace = NULL;
29342934

2935-
if (DoIt || makeDefault)
2935+
if (changeVal || makeDefault)
29362936
{
2937-
if (DoIt)
2937+
if (changeVal)
29382938
{
29392939
SET_STRING_VARIABLE(conf, newval);
29402940
conf->gen.source = source;
@@ -2976,7 +2976,7 @@ set_config_option(const char *name, const char *value,
29762976
}
29772977
}
29782978

2979-
if (DoIt && (record->flags & GUC_REPORT))
2979+
if (changeVal && (record->flags & GUC_REPORT))
29802980
ReportGUCOption(record);
29812981

29822982
return true;

src/include/utils/guc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
88
* Written by Peter Eisentraut <peter_e@gmx.net>.
99
*
10-
* $Id: guc.h,v 1.40 2003/08/04 23:59:41 tgl Exp $
10+
* $Id: guc.h,v 1.41 2003/09/01 04:15:51 momjian Exp $
1111
*--------------------------------------------------------------------
1212
*/
1313
#ifndef GUC_H
@@ -127,7 +127,7 @@ extern void BeginReportingGUCOptions(void);
127127
extern void ParseLongOption(const char *string, char **name, char **value);
128128
extern bool set_config_option(const char *name, const char *value,
129129
GucContext context, GucSource source,
130-
bool isLocal, bool DoIt);
130+
bool isLocal, bool changeVal);
131131
extern void ShowGUCConfigOption(const char *name, DestReceiver *dest);
132132
extern void ShowAllGUCConfig(DestReceiver *dest);
133133
extern char *GetConfigOptionByName(const char *name, const char **varname);

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