|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.46 1999/02/23 07:33:44 thomas Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.47 1999/03/10 12:16:09 vadim Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -1474,10 +1474,15 @@ ExecTargetList(List *targetlist,
|
1474 | 1474 | *is this a new phenomenon? it might cause bogus behavior
|
1475 | 1475 | *if we try to free this tuple later!! I put a hook in
|
1476 | 1476 | *ExecProject to watch out for this case -mer 24 Aug 1992
|
| 1477 | + * |
| 1478 | + *We must return dummy tuple!!! Try |
| 1479 | + *select t1.x from t1, t2 where t1.y = 1 and t2.y = 1 |
| 1480 | + *- t2 scan target list will be empty and so no one tuple |
| 1481 | + *will be returned! But Mer was right - dummy tuple |
| 1482 | + *must be palloced...- vadim 03/01/1999 |
1477 | 1483 | */
|
1478 |
| -CXT1_printf("ExecTargetList: context is %d\n",CurrentMemoryContext); |
1479 | 1484 | *isDone= true;
|
1480 |
| -return (HeapTuple)true; |
| 1485 | +return (HeapTuple)palloc(1); |
1481 | 1486 | }
|
1482 | 1487 |
|
1483 | 1488 | /*
|
@@ -1640,12 +1645,6 @@ ExecProject(ProjectionInfo *projInfo, bool *isDone)
|
1640 | 1645 | tupValue=projInfo->pi_tupValue;
|
1641 | 1646 | econtext=projInfo->pi_exprContext;
|
1642 | 1647 |
|
1643 |
| -if (targetlist==NIL) |
1644 |
| -{ |
1645 |
| -*isDone= true; |
1646 |
| -return (TupleTableSlot*)NULL; |
1647 |
| -} |
1648 |
| - |
1649 | 1648 | /*
|
1650 | 1649 | *form a new (result) tuple
|
1651 | 1650 | */
|
|