]> granicus.if.org Git - postgis/commitdiff
made accum(geom) compatible with PG72
authorSandro Santilli <strk@keybit.net>
Fri, 7 Jan 2005 12:28:07 +0000 (12:28 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 7 Jan 2005 12:28:07 +0000 (12:28 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1254 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_functions_basic.c

index c8cdaa72dc406944d27e8f24754757878f8ee576..1f8aaa7b73ced92c736e0eb40790607f0acc1d56 100644 (file)
@@ -1716,12 +1716,18 @@ Datum LWGEOM_accum(PG_FUNCTION_ARGS)
                        elog(ERROR, "Out of virtual memory");
                        PG_RETURN_NULL();
                }
-#ifdef DEBUG
-               elog(NOTICE, " %d bytes allocated for array (%d of header, %lu of geom, elemtype: %ld)", nbytes, ARR_OVERHEAD(1), INTALIGN(geom->size), get_fn_expr_argtype(fcinfo->flinfo, 1));
-#endif
+
                result->size = nbytes;
                result->ndim = 1;
+/*
+ * TODO: PG73 require array to contain ->elemtype, but
+ * does not contain the argument types in FmgrInfo.
+ * We need a way to obtain 'geometry' type oid.
+ */
+
+#if USE_VERSION > 73
                result->elemtype = get_fn_expr_argtype(fcinfo->flinfo, 1);
+#endif
                memcpy(ARR_DIMS(result), &nelems, sizeof(int));
                memcpy(ARR_LBOUND(result), &lbs, sizeof(int));
                memcpy(ARR_DATA_PTR(result), geom, geom->size);