Fix the recently-added code that eliminates unnecessary SubqueryScan nodes
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Nov 2005 17:34:03 +0000 (17:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Nov 2005 17:34:03 +0000 (17:34 +0000)
commitb17ae35d0df107488af15db05e1d01dad2040d1c
treea91dd92262d73725b619348f2718dcbf0c4823dd
parent5b6f6fc16ad0b1b8457e2e217c65ed450070eef2
Fix the recently-added code that eliminates unnecessary SubqueryScan nodes
from a finished plan tree.  We have to copy the output column names
(resname fields) from the SubqueryScan down to its child plan node;
else, if this is the topmost level of the plan, the wrong column names
will be delivered to the client.  Per bug #2017 reported by Jolly Chen.
src/backend/optimizer/plan/setrefs.c