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
f5371fee
Commit
f5371fee
authored
24 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Fix inadequate tree-walking code in exec_eval_clear_fcache.
parent
08ede423
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pl/plpgsql/src/pl_exec.c
+27
-23
27 additions, 23 deletions
src/pl/plpgsql/src/pl_exec.c
with
27 additions
and
23 deletions
src/pl/plpgsql/src/pl_exec.c
+
27
−
23
View file @
f5371fee
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* procedural language
* procedural language
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.3
2
2000/1
1/16 22:30
:5
0
tgl Exp $
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.3
3
2000/1
2/01 20:43
:5
9
tgl Exp $
*
*
* This software is copyrighted by Jan Wieck - Hamburg.
* This software is copyrighted by Jan Wieck - Hamburg.
*
*
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
#include
"executor/spi.h"
#include
"executor/spi.h"
#include
"executor/spi_priv.h"
#include
"executor/spi_priv.h"
#include
"fmgr.h"
#include
"fmgr.h"
#include
"optimizer/clauses.h"
#include
"parser/parse_expr.h"
#include
"parser/parse_expr.h"
#include
"tcop/tcopprot.h"
#include
"tcop/tcopprot.h"
#include
"utils/builtins.h"
#include
"utils/builtins.h"
...
@@ -112,6 +113,7 @@ static void exec_prepare_plan(PLpgSQL_execstate * estate,
...
@@ -112,6 +113,7 @@ static void exec_prepare_plan(PLpgSQL_execstate * estate,
static
bool
exec_simple_check_node
(
Node
*
node
);
static
bool
exec_simple_check_node
(
Node
*
node
);
static
void
exec_simple_check_plan
(
PLpgSQL_expr
*
expr
);
static
void
exec_simple_check_plan
(
PLpgSQL_expr
*
expr
);
static
void
exec_eval_clear_fcache
(
Node
*
node
);
static
void
exec_eval_clear_fcache
(
Node
*
node
);
static
bool
exec_eval_clear_fcache_walker
(
Node
*
node
,
void
*
context
);
static
Datum
exec_eval_simple_expr
(
PLpgSQL_execstate
*
estate
,
static
Datum
exec_eval_simple_expr
(
PLpgSQL_execstate
*
estate
,
PLpgSQL_expr
*
expr
,
PLpgSQL_expr
*
expr
,
bool
*
isNull
,
bool
*
isNull
,
...
@@ -2593,7 +2595,7 @@ exec_eval_simple_expr(PLpgSQL_execstate * estate,
...
@@ -2593,7 +2595,7 @@ exec_eval_simple_expr(PLpgSQL_execstate * estate,
*
rettype
=
expr
->
plan_simple_type
;
*
rettype
=
expr
->
plan_simple_type
;
/* ----------
/* ----------
* Clear
the
function cache
* Clear
any
function cache
entries in the expression tree
* ----------
* ----------
*/
*/
exec_eval_clear_fcache
(
expr
->
plan_simple_expr
);
exec_eval_clear_fcache
(
expr
->
plan_simple_expr
);
...
@@ -2904,32 +2906,34 @@ exec_simple_check_plan(PLpgSQL_expr * expr)
...
@@ -2904,32 +2906,34 @@ exec_simple_check_plan(PLpgSQL_expr * expr)
static
void
static
void
exec_eval_clear_fcache
(
Node
*
node
)
exec_eval_clear_fcache
(
Node
*
node
)
{
{
Expr
*
expr
;
/* This tree walk requires no special setup, so away we go... */
List
*
l
;
exec_eval_clear_fcache_walker
(
node
,
NULL
);
}
if
(
nodeTag
(
node
)
!=
T_Expr
)
return
;
expr
=
(
Expr
*
)
node
;
static
bool
exec_eval_clear_fcache_walker
(
Node
*
node
,
void
*
context
)
{
if
(
node
==
NULL
)
return
false
;
if
(
IsA
(
node
,
Expr
))
{
Expr
*
expr
=
(
Expr
*
)
node
;
switch
(
expr
->
opType
)
switch
(
expr
->
opType
)
{
{
case
OP_EXPR
:
case
OP_EXPR
:
((
Oper
*
)
(
expr
->
oper
))
->
op_fcache
=
NULL
;
((
Oper
*
)
(
expr
->
oper
))
->
op_fcache
=
NULL
;
break
;
break
;
case
FUNC_EXPR
:
case
FUNC_EXPR
:
((
Func
*
)
(
expr
->
oper
))
->
func_fcache
=
NULL
;
((
Func
*
)
(
expr
->
oper
))
->
func_fcache
=
NULL
;
break
;
break
;
default:
default:
break
;
break
;
}
}
foreach
(
l
,
expr
->
args
)
exec_eval_clear_fcache
(
lfirst
(
l
));
}
}
return
expression_tree_walker
(
node
,
exec_eval_clear_fcache_walker
,
context
);
}
/* ----------
/* ----------
* exec_set_found Set the global found variable
* exec_set_found Set the global found variable
...
...
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