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
a039148c
Commit
a039148c
authored
21 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
tlist_matches_tupdesc() needs to defend itself against dropped columns.
parent
c63a5452
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/executor/execScan.c
+4
-4
4 additions, 4 deletions
src/backend/executor/execScan.c
with
4 additions
and
4 deletions
src/backend/executor/execScan.c
+
4
−
4
View file @
a039148c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.2
7
2003/0
8/08 21:41:40 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.2
8
2003/0
9/25 19:41:49 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -196,9 +196,7 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
...
@@ -196,9 +196,7 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
for
(
attrno
=
1
;
attrno
<=
numattrs
;
attrno
++
)
for
(
attrno
=
1
;
attrno
<=
numattrs
;
attrno
++
)
{
{
#ifdef USE_ASSERT_CHECKING
/* only used in Assert() */
Form_pg_attribute
att_tup
=
tupdesc
->
attrs
[
attrno
-
1
];
Form_pg_attribute
att_tup
=
tupdesc
->
attrs
[
attrno
-
1
];
#endif
Var
*
var
;
Var
*
var
;
if
(
tlist
==
NIL
)
if
(
tlist
==
NIL
)
...
@@ -207,11 +205,13 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
...
@@ -207,11 +205,13 @@ tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc)
if
(
!
var
||
!
IsA
(
var
,
Var
))
if
(
!
var
||
!
IsA
(
var
,
Var
))
return
false
;
/* tlist item not a Var */
return
false
;
/* tlist item not a Var */
Assert
(
var
->
varno
==
varno
);
Assert
(
var
->
varno
==
varno
);
Assert
(
var
->
varlevelsup
==
0
);
if
(
var
->
varattno
!=
attrno
)
if
(
var
->
varattno
!=
attrno
)
return
false
;
/* out of order */
return
false
;
/* out of order */
if
(
att_tup
->
attisdropped
)
return
false
;
/* table contains dropped columns */
Assert
(
var
->
vartype
==
att_tup
->
atttypid
);
Assert
(
var
->
vartype
==
att_tup
->
atttypid
);
Assert
(
var
->
vartypmod
==
att_tup
->
atttypmod
);
Assert
(
var
->
vartypmod
==
att_tup
->
atttypmod
);
Assert
(
var
->
varlevelsup
==
0
);
tlist
=
lnext
(
tlist
);
tlist
=
lnext
(
tlist
);
}
}
...
...
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