From: Björn Harrtell Date: Mon, 6 Mar 2017 20:40:10 +0000 (+0000) Subject: Use PG_DETOAST_DATUM_COPY instead of clone deep X-Git-Tag: 2.4.0alpha~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=285b9df108479ce888c14932882a7b490f32a75b;p=postgis Use PG_DETOAST_DATUM_COPY instead of clone deep References #3720 git-svn-id: http://svn.osgeo.org/postgis/trunk@15322 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geobuf.c b/postgis/geobuf.c index e9f9aa1b2..7a2c1d896 100644 --- a/postgis/geobuf.c +++ b/postgis/geobuf.c @@ -539,8 +539,8 @@ void geobuf_agg_transfn(struct geobuf_agg_context *ctx) 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);