| 634 | */ |
| 635 | PG_FUNCTION_INFO_V1(array_contains); |
| 636 | Datum |
| 637 | array_contains(PG_FUNCTION_ARGS){ |
| 638 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 639 | if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); } |
| 640 | |
| 641 | ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0); |
| 642 | ArrayType *v2 = PG_GETARG_ARRAYTYPE_P(1); |
| 643 | |
| 644 | Datum res = General_2Array_to_Element(v1, v2, element_contains, noop_finalize); |
| 645 | |
| 646 | PG_FREE_IF_COPY(v1, 0); |
| 647 | PG_FREE_IF_COPY(v2, 1); |
| 648 | |
| 649 | if (DatumGetFloat8(res) == 0.) { |
| 650 | PG_RETURN_BOOL(TRUE); |
| 651 | } else { |
| 652 | PG_RETURN_BOOL(FALSE); |
| 653 | } |
| 654 | } |
| 655 | |
| 656 | /* |
| 657 | * This function returns the element-wise sum of two arrays. |
nothing calls this directly
no test coverage detected