* accumArrayResultAny - accumulate one (more) input for an array result * * astate is working state (can be NULL on first call) * dvalue/disnull represent the new input to append to the array * input_type is the input datatype (either element or array type) * rcontext is where to keep working state */
| 5708 | * rcontext is where to keep working state |
| 5709 | */ |
| 5710 | ArrayBuildStateAny * |
| 5711 | accumArrayResultAny(ArrayBuildStateAny *astate, |
| 5712 | Datum dvalue, bool disnull, |
| 5713 | Oid input_type, |
| 5714 | MemoryContext rcontext) |
| 5715 | { |
| 5716 | if (astate == NULL) |
| 5717 | astate = initArrayResultAny(input_type, rcontext, true); |
| 5718 | |
| 5719 | if (astate->scalarstate) |
| 5720 | (void) accumArrayResult(astate->scalarstate, |
| 5721 | dvalue, disnull, |
| 5722 | input_type, rcontext); |
| 5723 | else |
| 5724 | (void) accumArrayResultArr(astate->arraystate, |
| 5725 | dvalue, disnull, |
| 5726 | input_type, rcontext); |
| 5727 | |
| 5728 | return astate; |
| 5729 | } |
| 5730 | |
| 5731 | /* |
| 5732 | * makeArrayResultAny - produce final result of accumArrayResultAny |
no test coverage detected