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
a039148c
Commit
a039148c
authored
Sep 25, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tlist_matches_tupdesc() needs to defend itself against dropped columns.
parent
c63a5452
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/backend/executor/execScan.c
src/backend/executor/execScan.c
+4
-4
No files found.
src/backend/executor/execScan.c
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/08/08 21:41:40 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.2
8 2003/09/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
);
}
}
...
...
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