| 900 | */ |
| 901 | PG_FUNCTION_INFO_V1(array_cum_sum); |
| 902 | Datum |
| 903 | array_cum_sum(PG_FUNCTION_ARGS){ |
| 904 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 905 | |
| 906 | ArrayType *v = PG_GETARG_ARRAYTYPE_P(0); |
| 907 | ArrayType *res = General_Array_to_Cumulative_Array(v, Float8GetDatum(0.0), element_add); |
| 908 | |
| 909 | PG_FREE_IF_COPY(v, 0); |
| 910 | PG_RETURN_ARRAYTYPE_P(res); |
| 911 | } |
| 912 | |
| 913 | /* |
| 914 | * This function returns the cumulative product of the array elements. |
nothing calls this directly
no test coverage detected