Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
cd7206b2
Commit
cd7206b2
authored
Apr 24, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable to set _cpu_page_wight_ & _cpu_index_page_wight_ via
SET cost_heap(cost_index) TO ...
parent
0a08f2b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
src/backend/tcop/variable.c
src/backend/tcop/variable.c
+54
-1
No files found.
src/backend/tcop/variable.c
View file @
cd7206b2
...
@@ -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.
5 1997/04/23 06:09:36
vadim Exp $
* $Id: variable.c,v 1.
6 1997/04/24 15:41:37
vadim Exp $
*
*
*/
*/
...
@@ -11,6 +11,11 @@
...
@@ -11,6 +11,11 @@
#include "postgres.h"
#include "postgres.h"
#include "miscadmin.h"
#include "miscadmin.h"
#include "tcop/variable.h"
#include "tcop/variable.h"
#include "utils/builtins.h"
#include "optimizer/internal.h"
extern
Cost
_cpu_page_wight_
;
extern
Cost
_cpu_index_page_wight_
;
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
#if USE_EURODATES
#if USE_EURODATES
...
@@ -64,6 +69,50 @@ static bool reset_null(const char *value)
...
@@ -64,6 +69,50 @@ static bool reset_null(const char *value)
return
TRUE
;
return
TRUE
;
}
}
static
bool
parse_cost_heap
(
const
char
*
value
)
{
float32
res
=
float4in
((
char
*
)
value
);
_cpu_page_wight_
=
*
res
;
return
TRUE
;
}
static
bool
show_cost_heap
()
{
elog
(
NOTICE
,
"COST_HEAP is %f"
,
_cpu_page_wight_
);
return
TRUE
;
}
static
bool
reset_cost_heap
()
{
_cpu_page_wight_
=
_CPU_PAGE_WEIGHT_
;
return
TRUE
;
}
static
bool
parse_cost_index
(
const
char
*
value
)
{
float32
res
=
float4in
((
char
*
)
value
);
_cpu_index_page_wight_
=
*
res
;
return
TRUE
;
}
static
bool
show_cost_index
()
{
elog
(
NOTICE
,
"COST_INDEX is %f"
,
_cpu_index_page_wight_
);
return
TRUE
;
}
static
bool
reset_cost_index
()
{
_cpu_index_page_wight_
=
_CPU_INDEX_PAGE_WEIGHT_
;
return
TRUE
;
}
static
bool
parse_date
(
const
char
*
value
)
static
bool
parse_date
(
const
char
*
value
)
{
{
char
tok
[
32
];
char
tok
[
32
];
...
@@ -149,6 +198,10 @@ struct VariableParsers
...
@@ -149,6 +198,10 @@ struct VariableParsers
{
{
{
"datestyle"
,
parse_date
,
show_date
,
reset_date
},
{
"datestyle"
,
parse_date
,
show_date
,
reset_date
},
{
"timezone"
,
parse_null
,
show_null
,
reset_null
},
{
"timezone"
,
parse_null
,
show_null
,
reset_null
},
{
"cost_heap"
,
parse_cost_heap
,
show_cost_heap
,
reset_cost_heap
},
{
"cost_index"
,
parse_cost_index
,
show_cost_index
,
reset_cost_index
},
{
NULL
,
NULL
,
NULL
}
{
NULL
,
NULL
,
NULL
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment