Attached is a patch which fixes an oversight in _outAgg(): the "grpColIdx" and "grpOperators" fields of the Agg struct were not emitted by _outAgg(). I don't see any good reason to omit this information.
Note that while the "grpOperators" field was added during the 8.3 devel cycle, the "grpColIdx" field has been around since '02 (without outfuncs support). So I can backpatch that portion of the patch to back branches if anyone feels strongly. -Neil
Index: src/backend/nodes/outfuncs.c =================================================================== RCS file: /home/neilc/postgres/cvs_root/pgsql/src/backend/nodes/outfuncs.c,v retrieving revision 1.321 diff -p -c -r1.321 outfuncs.c *** src/backend/nodes/outfuncs.c 7 Jan 2008 21:33:10 -0000 1.321 --- src/backend/nodes/outfuncs.c 9 Jan 2008 03:01:33 -0000 *************** _outHashJoin(StringInfo str, HashJoin *n *** 501,512 **** --- 501,523 ---- static void _outAgg(StringInfo str, Agg *node) { + int i; + WRITE_NODE_TYPE("AGG"); _outPlanInfo(str, (Plan *) node); WRITE_ENUM_FIELD(aggstrategy, AggStrategy); WRITE_INT_FIELD(numCols); + + appendStringInfo(str, " :grpColIdx"); + for (i = 0; i < node->numCols; i++) + appendStringInfo(str, " %d", node->grpColIdx[i]); + + appendStringInfo(str, " :grpOperators"); + for (i = 0; i < node->numCols; i++) + appendStringInfo(str, " %u", node->grpOperators[i]); + WRITE_LONG_FIELD(numGroups); }
---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings