Re: Question about using AggCheckCallContext in a C function
| От | Tom Lane |
|---|---|
| Тема | Re: Question about using AggCheckCallContext in a C function |
| Дата | |
| Msg-id | 23158.1376333610@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Question about using AggCheckCallContext in a C function (Matt Solnit <msolnit@soasta.com>) |
| Ответы |
Re: Question about using AggCheckCallContext in a C
function
|
| Список | pgsql-general |
Matt Solnit <msolnit@soasta.com> 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
В списке pgsql-general по дате отправления: