| 881 | */ |
| 882 | PG_FUNCTION_INFO_V1(array_scalar_add); |
| 883 | Datum |
| 884 | array_scalar_add(PG_FUNCTION_ARGS){ |
| 885 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 886 | if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); } |
| 887 | |
| 888 | ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0); |
| 889 | Datum v2 = PG_GETARG_DATUM(1); |
| 890 | |
| 891 | ArrayType *res = General_Array_to_Array(v1, v2, element_add); |
| 892 | |
| 893 | PG_FREE_IF_COPY(v1, 0); |
| 894 | |
| 895 | PG_RETURN_ARRAYTYPE_P(res); |
| 896 | } |
| 897 | |
| 898 | /* |
| 899 | * This function returns the cumulative sum of the array elements. |
nothing calls this directly
no test coverage detected