]> granicus.if.org Git - postgis/commitdiff
#3009, geography case may alter tuple values
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 17 Dec 2014 17:36:01 +0000 (17:36 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 17 Dec 2014 17:36:01 +0000 (17:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13150 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_inout.c

index b18229456915695dfc4900189a38002b786471b5..74b35be4dad98c3d5b2af2bc5bd1a4d994361ca5 100644 (file)
@@ -567,7 +567,7 @@ Datum geography_from_binary(PG_FUNCTION_ARGS)
 PG_FUNCTION_INFO_V1(geography_from_geometry);
 Datum geography_from_geometry(PG_FUNCTION_ARGS)
 {
-       GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
+       GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
        LWGEOM *lwgeom = NULL;
        GSERIALIZED *g_ser = NULL;