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
9da6d2c0
Commit
9da6d2c0
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
ExecSubPlan needs to be able to cope with RelabelType nodes atop the
Const placeholder nodes for subplan result values.
parent
b212e7ad
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/backend/executor/nodeSubplan.c
+20
-8
20 additions, 8 deletions
src/backend/executor/nodeSubplan.c
with
20 additions
and
8 deletions
src/backend/executor/nodeSubplan.c
+
20
−
8
View file @
9da6d2c0
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.2
3
2000/03/2
1
0
4:20:45
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.2
4
2000/03/2
3
0
7:32:58
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -141,16 +141,28 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext, bool *isNull)
/*
* The righthand side of the expression should be either a Const
* or a function call taking a Const as arg (the function would
* be a run-time type coercion inserted by the parser to get to
* the input type needed by the operator). Find the Const node
* and insert the actual righthand side value into it.
* or a function call or RelabelType node taking a Const as arg
* (these nodes represent run-time type coercions inserted by
* the parser to get to the input type needed by the operator).
* Find the Const node and insert the actual righthand-side value
* into it.
*/
if
(
!
IsA
(
con
,
Const
))
{
Assert
(
IsA
(
con
,
Expr
));
switch
(
con
->
type
)
{
case
T_Expr
:
con
=
lfirst
(((
Expr
*
)
con
)
->
args
);
Assert
(
IsA
(
con
,
Const
));
break
;
case
T_RelabelType
:
con
=
(
Const
*
)
(((
RelabelType
*
)
con
)
->
arg
);
break
;
default:
/* will fail below */
break
;
}
if
(
!
IsA
(
con
,
Const
))
elog
(
ERROR
,
"ExecSubPlan: failed to find placeholder for subplan result"
);
}
con
->
constvalue
=
heap_getattr
(
tup
,
col
,
tdesc
,
&
(
con
->
constisnull
));
...
...
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