| 2859 | */ |
| 2860 | |
| 2861 | static float8 * |
| 2862 | check_float8_array(ArrayType *transarray, const char *caller, int n) |
| 2863 | { |
| 2864 | /* |
| 2865 | * We expect the input to be an N-element float array; verify that. We |
| 2866 | * don't need to use deconstruct_array() since the array data is just |
| 2867 | * going to look like a C array of N float8 values. |
| 2868 | */ |
| 2869 | if (ARR_NDIM(transarray) != 1 || |
| 2870 | ARR_DIMS(transarray)[0] != n || |
| 2871 | ARR_HASNULL(transarray) || |
| 2872 | ARR_ELEMTYPE(transarray) != FLOAT8OID) |
| 2873 | elog(ERROR, "%s: expected %d-element float8 array", caller, n); |
| 2874 | return (float8 *) ARR_DATA_PTR(transarray); |
| 2875 | } |
| 2876 | |
| 2877 | /* |
| 2878 | * float8_combine |
no outgoing calls
no test coverage detected