| 824 | */ |
| 825 | PG_FUNCTION_INFO_V1(array_fill); |
| 826 | Datum |
| 827 | array_fill(PG_FUNCTION_ARGS){ |
| 828 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 829 | if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); } |
| 830 | |
| 831 | ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0); |
| 832 | Datum v2 = PG_GETARG_DATUM(1); |
| 833 | |
| 834 | ArrayType *res = General_Array_to_Array(v1, v2, element_set); |
| 835 | |
| 836 | PG_FREE_IF_COPY(v1, 0); |
| 837 | |
| 838 | PG_RETURN_ARRAYTYPE_P(res); |
| 839 | } |
| 840 | |
| 841 | /* |
| 842 | * This function apply cos function to each element. |
nothing calls this directly
no test coverage detected