Content-Length: 270967 | pFad | http://github.com/postgrespro/postgres/commit/96f8373cad5d6066baeb7a1c5a88f6f5c9661974

88 Fix bug in aggregate (de)serialization commit. · postgrespro/postgres@96f8373 · GitHub
Skip to content

Commit 96f8373

Browse files
committed
Fix bug in aggregate (de)serialization commit.
resulttypeLen and resulttypeByVal must be set correctly when serializing aggregates, not just when finalizing them. This was in David's final patch but I downloaded the wrong version by mistake and failed to spot the error. David Rowley
1 parent 5fe5a2c commit 96f8373

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/backend/executor/nodeAgg.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,11 +2862,10 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
28622862
fmgr_info_set_expr((Node *) finalfnexpr, &peragg->finalfn);
28632863
}
28642864

2865-
/* when finalizing we get info about the final result's datatype */
2866-
if (aggstate->finalizeAggs)
2867-
get_typlenbyval(aggref->aggtype,
2868-
&peragg->resulttypeLen,
2869-
&peragg->resulttypeByVal);
2865+
/* get info about the output value's datatype */
2866+
get_typlenbyval(aggref->aggoutputtype,
2867+
&peragg->resulttypeLen,
2868+
&peragg->resulttypeByVal);
28702869

28712870
/*
28722871
* initval is potentially null, so don't try to access it as a struct

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/96f8373cad5d6066baeb7a1c5a88f6f5c9661974

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy