| 724 | */ |
| 725 | PG_FUNCTION_INFO_V1(array_div); |
| 726 | Datum |
| 727 | array_div(PG_FUNCTION_ARGS){ |
| 728 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 729 | if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); } |
| 730 | |
| 731 | ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0); |
| 732 | ArrayType *v2 = PG_GETARG_ARRAYTYPE_P(1); |
| 733 | |
| 734 | ArrayType *res = General_2Array_to_Array(v1, v2, element_div); |
| 735 | |
| 736 | PG_FREE_IF_COPY(v1, 0); |
| 737 | PG_FREE_IF_COPY(v2, 1); |
| 738 | |
| 739 | PG_RETURN_ARRAYTYPE_P(res); |
| 740 | } |
| 741 | |
| 742 | /* |
| 743 | * This function takes the absolute value for each element. |
nothing calls this directly
no test coverage detected