Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f26146

Browse files
committed
Revert previous change --- turns out the underlying problem affects
more cases than I thought, so ExecTypeFromTL() will have to be fixedanyway.
1 parent8f2e53b commit6f26146

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

‎src/backend/optimizer/plan/createplan.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.140 2003/05/1115:03:52 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.141 2003/05/1120:25:50 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -295,12 +295,6 @@ use_physical_tlist(RelOptInfo *rel)
295295
*/
296296
if (rel->reloptkind!=RELOPT_BASEREL)
297297
return false;
298-
/*
299-
* Can't do it if relation contains dropped columns. This is detected
300-
* in plancat.c, see notes there.
301-
*/
302-
if (rel->varlist==NIL)
303-
return false;
304298
/*
305299
* Can't do it if any system columns are requested, either. (This could
306300
* possibly be fixed but would take some fragile assumptions in setrefs.c,

‎src/backend/optimizer/util/plancat.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* 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 $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -62,29 +62,15 @@ get_relation_info(Oid relationObjectId, RelOptInfo *rel)
6262
relation=heap_open(relationObjectId,AccessShareLock);
6363

6464
/*
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.
7467
*/
7568
numattrs=RelationGetNumberOfAttributes(relation);
7669

7770
for (attrno=1;attrno <=numattrs;attrno++)
7871
{
7972
Form_pg_attributeatt_tup=relation->rd_att->attrs[attrno-1];
8073

81-
if (att_tup->attisdropped)
82-
{
83-
/* found a dropped col, so punt */
84-
varlist=NIL;
85-
break;
86-
}
87-
8874
varlist=lappend(varlist,
8975
makeVar(varno,
9076
attrno,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp