Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4ab256

Browse files
committed
New VAR r_plans added to enable turn ON/OFF
using right-sided plans.
1 parent0f67fb4 commitc4ab256

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

‎src/backend/tcop/variable.c

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
33
* statements.
44
*
5-
* $Id: variable.c,v 1.8 1997/05/16 07:24:13 thomas Exp $
5+
* $Id: variable.c,v 1.9 1997/05/20 10:31:42 vadim Exp $
66
*
77
*/
88

@@ -17,6 +17,7 @@
1717
externCost_cpu_page_wight_;
1818
externCost_cpu_index_page_wight_;
1919
externbool_use_geqo_;
20+
externbool_use_right_sided_plans_;
2021

2122
/*-----------------------------------------------------------------------*/
2223
#ifUSE_EURODATES
@@ -104,6 +105,40 @@ static bool reset_geqo ()
104105
return TRUE;
105106
}
106107

108+
staticboolparse_r_plans (constchar*value)
109+
{
110+
111+
if (strcasecmp (value,"on")==0 )
112+
_use_right_sided_plans_= true;
113+
elseif (strcasecmp (value,"off")==0 )
114+
_use_right_sided_plans_= false;
115+
else
116+
elog(WARN,"Bad value for Right-sided Plans (%s)",value);
117+
118+
return TRUE;
119+
}
120+
121+
staticboolshow_r_plans ()
122+
{
123+
124+
if (_use_right_sided_plans_ )
125+
elog (NOTICE,"Right-sided Plans are ON");
126+
else
127+
elog (NOTICE,"Right-sided Plans are OFF");
128+
return TRUE;
129+
}
130+
131+
staticboolreset_r_plans ()
132+
{
133+
134+
#ifdefUSE_RIGHT_SIDED_PLANS
135+
_use_right_sided_plans_= true;
136+
#else
137+
_use_right_sided_plans_= false;
138+
#endif
139+
return TRUE;
140+
}
141+
107142
staticboolparse_cost_heap (constchar*value)
108143
{
109144
float32res=float4in ((char*)value);
@@ -250,6 +285,7 @@ struct VariableParsers
250285
{"cost_index",parse_cost_index,
251286
show_cost_index,reset_cost_index },
252287
{"geqo",parse_geqo,show_geqo,reset_geqo },
288+
{"r_plans",parse_r_plans,show_r_plans,reset_r_plans },
253289
{NULL,NULL,NULL }
254290
};
255291

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp