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

Commitde97e7f

Browse files
committed
SET geqo TO ON|OFF
1 parenta4792bd commitde97e7f

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.6 1997/04/24 15:41:37 vadim Exp $
5+
* $Id: variable.c,v 1.7 1997/04/29 04:38:58 vadim Exp $
66
*
77
*/
88

@@ -16,6 +16,7 @@
1616

1717
externCost_cpu_page_wight_;
1818
externCost_cpu_index_page_wight_;
19+
externbool_use_geqo_;
1920

2021
/*-----------------------------------------------------------------------*/
2122
#ifUSE_EURODATES
@@ -69,6 +70,40 @@ static bool reset_null(const char *value)
6970
return TRUE;
7071
}
7172

73+
staticboolparse_geqo (constchar*value)
74+
{
75+
76+
if (strcasecmp (value,"on")==0 )
77+
_use_geqo_= true;
78+
elseif (strcasecmp (value,"off")==0 )
79+
_use_geqo_= false;
80+
else
81+
elog(WARN,"Bad value for GEQO (%s)",value);
82+
83+
return TRUE;
84+
}
85+
86+
staticboolshow_geqo ()
87+
{
88+
89+
if (_use_geqo_ )
90+
elog (NOTICE,"GEQO is ON");
91+
else
92+
elog (NOTICE,"GEQO is OFF");
93+
return TRUE;
94+
}
95+
96+
staticboolreset_geqo ()
97+
{
98+
99+
#ifdefGEQO
100+
_use_geqo_= true;
101+
#else
102+
_use_geqo_= false;
103+
#endif
104+
return TRUE;
105+
}
106+
72107
staticboolparse_cost_heap (constchar*value)
73108
{
74109
float32res=float4in ((char*)value);
@@ -202,6 +237,7 @@ struct VariableParsers
202237
show_cost_heap,reset_cost_heap },
203238
{"cost_index",parse_cost_index,
204239
show_cost_index,reset_cost_index },
240+
{"geqo",parse_geqo,show_geqo,reset_geqo },
205241
{NULL,NULL,NULL }
206242
};
207243

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp