double * geo_distance(Point *pt1, Point *pt2) { double *resultp = palloc(sizeof(double)); *resultp = geo_distance_internal(pt1, pt2); return resultp; }
datum_t geo_distance(PG_FUNC_ARGS) { Point *pt1 = ARG_POINT_P(0); Point *pt2 = ARG_POINT_P(1); float8 result; result = geo_distance_internal(pt1, pt2); RET_FLOAT8(result); }
Datum geo_distance(PG_FUNCTION_ARGS) { Point *pt1 = PG_GETARG_POINT_P(0); Point *pt2 = PG_GETARG_POINT_P(1); float8 result; result = geo_distance_internal(pt1, pt2); PG_RETURN_FLOAT8(result); }