|
9 | 9 | * |
10 | 10 | * |
11 | 11 | * IDENTIFICATION |
12 | | - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.80 2003/05/1115:03:52 tgl Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.81 2003/05/1120:25:50 tgl Exp $ |
13 | 13 | * |
14 | 14 | *------------------------------------------------------------------------- |
15 | 15 | */ |
@@ -62,29 +62,15 @@ get_relation_info(Oid relationObjectId, RelOptInfo *rel) |
62 | 62 | relation=heap_open(relationObjectId,AccessShareLock); |
63 | 63 |
|
64 | 64 | /* |
65 | | - * Make list of physical Vars. But if there are any dropped columns, |
66 | | - * punt and set varlist to NIL. (XXX Ideally we would like to include |
67 | | - * dropped columns so that the varlist models the physical tuples |
68 | | - * of the relation. However this creates problems for ExecTypeFromTL, |
69 | | - * which may be asked to build a tupdesc for a tlist that includes vars |
70 | | - * of no-longer-existent types. In theory we could dig out the required |
71 | | - * info from the pg_attribute entries of the relation, but that data is |
72 | | - * not readily available to ExecTypeFromTL. For now, punt and don't |
73 | | - * apply the physical-tlist optimization when there are dropped cols.) |
| 65 | + * Make list of physical Vars. Note we do NOT ignore dropped columns; |
| 66 | + * the intent is to model the physical tuples of the relation. |
74 | 67 | */ |
75 | 68 | numattrs=RelationGetNumberOfAttributes(relation); |
76 | 69 |
|
77 | 70 | for (attrno=1;attrno <=numattrs;attrno++) |
78 | 71 | { |
79 | 72 | Form_pg_attributeatt_tup=relation->rd_att->attrs[attrno-1]; |
80 | 73 |
|
81 | | -if (att_tup->attisdropped) |
82 | | -{ |
83 | | -/* found a dropped col, so punt */ |
84 | | -varlist=NIL; |
85 | | -break; |
86 | | -} |
87 | | - |
88 | 74 | varlist=lappend(varlist, |
89 | 75 | makeVar(varno, |
90 | 76 | attrno, |
|