mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Put back copyObject() call I removed in a fit of brain fade. This one
is still needed despite cleanups in setrefs.c, because the point is to let the inserted Result node compute a different tlist than its input node does. Per example from Jeremy Drake.
This commit is contained in:
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.226 2007/02/22 22:00:24 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.227 2007/02/25 17:44:01 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2740,7 +2740,11 @@ make_sort_from_pathkeys(PlannerInfo *root, Plan *lefttree, List *pathkeys)
|
|||||||
* Do we need to insert a Result node?
|
* Do we need to insert a Result node?
|
||||||
*/
|
*/
|
||||||
if (!is_projection_capable_plan(lefttree))
|
if (!is_projection_capable_plan(lefttree))
|
||||||
|
{
|
||||||
|
/* copy needed so we don't modify input's tlist below */
|
||||||
|
tlist = copyObject(tlist);
|
||||||
lefttree = (Plan *) make_result(root, tlist, NULL, lefttree);
|
lefttree = (Plan *) make_result(root, tlist, NULL, lefttree);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add resjunk entry to input's tlist
|
* Add resjunk entry to input's tlist
|
||||||
|
Reference in New Issue
Block a user