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
f5371fee
Commit
f5371fee
authored
Dec 01, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inadequate tree-walking code in exec_eval_clear_fcache.
parent
08ede423
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_exec.c
+27
-23
No files found.
src/pl/plpgsql/src/pl_exec.c
View file @
f5371fee
...
...
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.3
2 2000/11/16 22:30:50
tgl Exp $
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.3
3 2000/12/01 20:43:59
tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -54,6 +54,7 @@
#include "executor/spi.h"
#include "executor/spi_priv.h"
#include "fmgr.h"
#include "optimizer/clauses.h"
#include "parser/parse_expr.h"
#include "tcop/tcopprot.h"
#include "utils/builtins.h"
...
...
@@ -112,6 +113,7 @@ static void exec_prepare_plan(PLpgSQL_execstate * estate,
static
bool
exec_simple_check_node
(
Node
*
node
);
static
void
exec_simple_check_plan
(
PLpgSQL_expr
*
expr
);
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
,
PLpgSQL_expr
*
expr
,
bool
*
isNull
,
...
...
@@ -2593,7 +2595,7 @@ exec_eval_simple_expr(PLpgSQL_execstate * estate,
*
rettype
=
expr
->
plan_simple_type
;
/* ----------
* Clear
the function cach
e
* Clear
any function cache entries in the expression tre
e
* ----------
*/
exec_eval_clear_fcache
(
expr
->
plan_simple_expr
);
...
...
@@ -2904,33 +2906,35 @@ exec_simple_check_plan(PLpgSQL_expr * expr)
static
void
exec_eval_clear_fcache
(
Node
*
node
)
{
Expr
*
expr
;
List
*
l
;
if
(
nodeTag
(
node
)
!=
T_Expr
)
return
;
/* This tree walk requires no special setup, so away we go... */
exec_eval_clear_fcache_walker
(
node
,
NULL
);
}
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
)
{
case
OP_EXPR
:
((
Oper
*
)
(
expr
->
oper
))
->
op_fcache
=
NULL
;
break
;
case
FUNC_EXPR
:
((
Func
*
)
(
expr
->
oper
))
->
func_fcache
=
NULL
;
break
;
default:
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
* to true/false
...
...
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