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

Function array_pow

methods/array_ops/src/pg_gp/array_ops.c:787–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785 */
786PG_FUNCTION_INFO_V1(array_pow);
787Datum
788array_pow(PG_FUNCTION_ARGS){
789 if (PG_ARGISNULL(0)) { PG_RETURN_NULL(); }
790 if (PG_ARGISNULL(1)) { PG_RETURN_NULL(); }
791
792 ArrayType *v1 = PG_GETARG_ARRAYTYPE_P(0);
793 Datum v2 = PG_GETARG_DATUM(1);
794
795 ArrayType *res = General_Array_to_Array(v1, v2, element_pow);
796
797 PG_FREE_IF_COPY(v1, 0);
798
799 PG_RETURN_ARRAYTYPE_P(res);
800}
801
802/*
803 * This function takes the square for each element.

Callers

nothing calls this directly

Calls 1

General_Array_to_ArrayFunction · 0.85

Tested by

no test coverage detected