MCPcopy Create free account
hub / github.com/apache/madlib / array_div

Function array_div

methods/array_ops/src/pg_gp/array_ops.c:726–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724 */
725PG_FUNCTION_INFO_V1(array_div);
726Datum
727array_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.

Callers

nothing calls this directly

Calls 1

General_2Array_to_ArrayFunction · 0.85

Tested by

no test coverage detected