Matt Solnit <msolnit@xxxxxxxxxx> writes: > After poring over the code in nodeAgg.c, and looking at the in8inc() > function, I think I know what the problem is: the typical use of > AggCheckCallContext() is not compatible with TOAST-able data types. That's nonsense. There are several standard aggregates that use that with array transition values. Personally, I'd wonder about the blind-faith assumption in your code that all the input arrays are exactly the same length, with no NULL elements. At the very least a check for that would seem advisable. An empty (zero-dimensional) array could also make this code crash, so I'd be inclined to put in a check that ARR_NDIM() is 1, too. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general