From 81d7af9e9aeaaedda2e12b3e454d61b0a28286f3 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 22 Jun 2016 15:21:09 -0400 Subject: [PATCH] fixes return problem --- src/pg/sql/08_interpolation.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pg/sql/08_interpolation.sql b/src/pg/sql/08_interpolation.sql index 04f1584..76fad01 100644 --- a/src/pg/sql/08_interpolation.sql +++ b/src/pg/sql/08_interpolation.sql @@ -14,9 +14,12 @@ $$ DECLARE gs geometry[]; vs numeric[]; + output numeric; BEGIN EXECUTE 'WITH a AS('||query||') SELECT array_agg(the_geom), array_agg(attrib) FROM a' INTO gs, vs; - RETURN QUERY SELECT CDB_SpatialInterpolation(gs, vs, point, method, p1,p2) FROM a; + SELECT CDB_SpatialInterpolation(gs, vs, point, method, p1,p2) INTO output FROM a; + + RETURN output; END; $$ language plpgsql IMMUTABLE;