| 843 | */ |
| 844 | PG_FUNCTION_INFO_V1(array_cos); |
| 845 | Datum |
| 846 | array_cos(PG_FUNCTION_ARGS){ |
| 847 | if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); } |
| 848 | |
| 849 | ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0); |
| 850 | Oid element_type = ARR_ELEMTYPE(v1); |
| 851 | Datum v2 = float8_datum_cast(0, element_type); |
| 852 | |
| 853 | ArrayType *res = General_Array_to_Array(v1, v2, element_cos); |
| 854 | |
| 855 | PG_FREE_IF_COPY(v1, 0); |
| 856 | |
| 857 | PG_RETURN_ARRAYTYPE_P(res); |
| 858 | } |
| 859 | |
| 860 | /* |
| 861 | * This function multiplies the specified value to each element. |
nothing calls this directly
no test coverage detected