Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
de97e7fa
Commit
de97e7fa
authored
27 years ago
by
Vadim B. Mikheev
Browse files
Options
Downloads
Patches
Plain Diff
SET geqo TO ON|OFF
parent
a4792bd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/tcop/variable.c
+37
-1
37 additions, 1 deletion
src/backend/tcop/variable.c
with
37 additions
and
1 deletion
src/backend/tcop/variable.c
+
37
−
1
View file @
de97e7fa
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements.
* statements.
*
*
* $Id: variable.c,v 1.
6
1997/04/2
4 15:41:37
vadim Exp $
* $Id: variable.c,v 1.
7
1997/04/2
9 04:38:58
vadim Exp $
*
*
*/
*/
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
extern
Cost
_cpu_page_wight_
;
extern
Cost
_cpu_page_wight_
;
extern
Cost
_cpu_index_page_wight_
;
extern
Cost
_cpu_index_page_wight_
;
extern
bool
_use_geqo_
;
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
#if USE_EURODATES
#if USE_EURODATES
...
@@ -69,6 +70,40 @@ static bool reset_null(const char *value)
...
@@ -69,6 +70,40 @@ static bool reset_null(const char *value)
return
TRUE
;
return
TRUE
;
}
}
static
bool
parse_geqo
(
const
char
*
value
)
{
if
(
strcasecmp
(
value
,
"on"
)
==
0
)
_use_geqo_
=
true
;
else
if
(
strcasecmp
(
value
,
"off"
)
==
0
)
_use_geqo_
=
false
;
else
elog
(
WARN
,
"Bad value for GEQO (%s)"
,
value
);
return
TRUE
;
}
static
bool
show_geqo
()
{
if
(
_use_geqo_
)
elog
(
NOTICE
,
"GEQO is ON"
);
else
elog
(
NOTICE
,
"GEQO is OFF"
);
return
TRUE
;
}
static
bool
reset_geqo
()
{
#ifdef GEQO
_use_geqo_
=
true
;
#else
_use_geqo_
=
false
;
#endif
return
TRUE
;
}
static
bool
parse_cost_heap
(
const
char
*
value
)
static
bool
parse_cost_heap
(
const
char
*
value
)
{
{
float32
res
=
float4in
((
char
*
)
value
);
float32
res
=
float4in
((
char
*
)
value
);
...
@@ -202,6 +237,7 @@ struct VariableParsers
...
@@ -202,6 +237,7 @@ struct VariableParsers
show_cost_heap
,
reset_cost_heap
},
show_cost_heap
,
reset_cost_heap
},
{
"cost_index"
,
parse_cost_index
,
{
"cost_index"
,
parse_cost_index
,
show_cost_index
,
reset_cost_index
},
show_cost_index
,
reset_cost_index
},
{
"geqo"
,
parse_geqo
,
show_geqo
,
reset_geqo
},
{
NULL
,
NULL
,
NULL
}
{
NULL
,
NULL
,
NULL
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment