Fix oversight in planning of GROUP queries: when an expression is used

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 07c741e61c8cb1fd945907a225d15467a08aca70
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-01-09T03:48:51Z
Releases: 7.1.1
Fix oversight in planning of GROUP queries: when an expression is used
as both a GROUP BY item and an output expression, the top-level Group
node should just copy up the evaluated expression value from its input,
rather than re-evaluating the expression.  Aside from any performance
benefit this might offer, this avoids a crash when there is a sub-SELECT
in said expression.

Files