Change fix_scan_expr() to avoid copying the input node tree in the common case
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 24 Nov 2007 00:39:44 +0000 (00:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 24 Nov 2007 00:39:44 +0000 (00:39 +0000)
commitea71fedbc89893d5905a64e016d56eeb654de1e1
tree76a6dfc4e7388489756d031deaf8f90646e58a9e
parente074b6e5cc47be05c901b2e2922446b1d15c93c4
Change fix_scan_expr() to avoid copying the input node tree in the common case
where rtoffset == 0.  In that case there is no need to change Var nodes,
and since filling in unset opfuncid fields is always safe, scribbling on the
input tree to that extent is not objectionable.  This brings the cost of this
operation back down to what it was in 8.2 for simple queries.  Per
investigation of performance gripe from Guillaume Smet.
src/backend/optimizer/plan/setrefs.c