1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Disable the recently-added use_physical_tlist optimization in cases

where the table contains dropped columns.  If the columns are dropped,
then their types may be gone as well, which causes ExecTypeFromTL() to
fail if the dropped columns appear in a plan node's tlist.  This could
be worked around but I don't think the optimization is valuable enough
to be worth the trouble.
This commit is contained in:
Tom Lane
2003-05-11 15:03:52 +00:00
parent a4e775a263
commit 8f2e53bc10
2 changed files with 24 additions and 4 deletions

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.139 2003/05/06 00:20:32 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.140 2003/05/11 15:03:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -295,6 +295,12 @@ use_physical_tlist(RelOptInfo *rel)
*/
if (rel->reloptkind != RELOPT_BASEREL)
return false;
/*
* Can't do it if relation contains dropped columns. This is detected
* in plancat.c, see notes there.
*/
if (rel->varlist == NIL)
return false;
/*
* Can't do it if any system columns are requested, either. (This could
* possibly be fixed but would take some fragile assumptions in setrefs.c,