References #3720
git-svn-id: http://svn.osgeo.org/postgis/trunk@15322
b70326c6-7e19-0410-871a-
916f4a2858ee
datum = GetAttributeByNum(ctx->row, ctx->geom_index + 1, &isnull);
if (!datum)
lwerror("geobuf_agg_transfn: geometry column cannot be null");
- gs = (GSERIALIZED *) PG_DETOAST_DATUM(datum);
- lwgeom = lwgeom_clone_deep(lwgeom_from_gserialized(gs));
+ gs = (GSERIALIZED *) PG_DETOAST_DATUM_COPY(datum);
+ lwgeom = lwgeom_from_gserialized(gs);
feature = encode_feature(ctx);