>>>>> "Jeevan" == Jeevan Chalke <jeevan.cha...@enterprisedb.com> writes:
Jeevan> Hi, Jeevan> While playing with LATERAL along with some aggregates in Jeevan> sub-query, I have observed somewhat unusual behavior. Simpler example not needing LATERAL: select array(select sum(x+y) from generate_series(1,3) y group by y) from generate_series(1,3) x; ?column? ---------- {2,4,3} {2,4,3} {2,4,3} (3 rows) This is broken all the way back, it's not a recent bug. Something is wrong with the way chgParam is being handled in Agg nodes. The code in ExecReScanAgg seems to assume that if the lefttree doesn't have any parameter changes then it suffices to re-project the data from the existing hashtable; but of course this is nonsense if the parameter is in an input to an aggregate function. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers