if (fcinfo->context && IsA(fcinfo->context, AggState))
aggcontext = ((AggState *) fcinfo->context)->aggcontext;
#if POSTGIS_PGSQL_VERSION == 84
+
else if (fcinfo->context && IsA(fcinfo->context, WindowAggState))
aggcontext = ((WindowAggState *) fcinfo->context)->wincontext;
#endif
#if POSTGIS_PGSQL_VERSION > 84
+
else if (fcinfo->context && IsA(fcinfo->context, WindowAggState))
aggcontext = ((WindowAggState *) fcinfo->context)->aggcontext;
#endif
+
else
{
/* cannot be called directly because of dummy-type argument */
elog(ERROR, "array_agg_transfn called in non-aggregate context");
- aggcontext = NULL; /* keep compiler quiet */
+ aggcontext = NULL; /* keep compiler quiet */
}
if ( PG_ARGISNULL(0) )
dims[0] = state->nelems;
lbs[0] = 1;
#if POSTGIS_PGSQL_VERSION < 84
+
result = makeMdArrayResult(state, 1, dims, lbs, mctx);
#else
+
result = makeMdArrayResult(state, 1, dims, lbs, mctx, false);
#endif
+
return result;
}
Datum result;
#if POSTGIS_PGSQL_VERSION > 90
- InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
+
+ InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
#else
- InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
-#endif
+
+ InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
+#endif
fcinfo.arg[0] = arg1;
fcinfo.argnull[0] = false;