]> granicus.if.org Git - postgis/commitdiff
#2780, Binary insert into geography column results in value being inserted as geometry
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 14 Aug 2014 22:53:26 +0000 (22:53 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 14 Aug 2014 22:53:26 +0000 (22:53 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12887 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/geography.sql.in
postgis/geography_inout.c

diff --git a/NEWS b/NEWS
index c4bb01558dcfbc8b2e4fb3b072ef875d60e8bc68..f9803814f6a6189164bab388bb9950ee0194e2b9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -93,6 +93,7 @@ PostGIS 2.2.0
   - #2822, Use @ operator instead of ST_CoveredBy() for raster
            max extent constraint
   - #2845, Bad geometry created from ST_AddPoint
+  - #2870, Binary insert into geography column results in value being inserted as geometry
 
  * Code refactoring *
 
index 852e1e1107f85111029463c7957c82bedb89fcb8..efccf5c51587f0251be6be6708393e28fecc0377 100644 (file)
@@ -84,7 +84,7 @@ CREATE CAST (geography AS geography) WITH FUNCTION geography(geography, integer,
 -- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION geography(bytea)
        RETURNS geography
-       AS 'MODULE_PATHNAME','LWGEOM_from_bytea'
+       AS 'MODULE_PATHNAME','geography_from_binary'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Availability: 2.0.0
index 94a78c7f21901ae69fbdbc91b1a5c79fb95a2ae1..b18229456915695dfc4900189a38002b786471b5 100644 (file)
@@ -558,7 +558,7 @@ Datum geography_from_binary(PG_FUNCTION_ARGS)
        if ( ! lwgeom )
                lwerror("Unable to parse WKB");
                
-       gser = gserialized_geography_from_lwgeom(lwgeom, 0);
+       gser = gserialized_geography_from_lwgeom(lwgeom, -1);
        lwgeom_free(lwgeom);
        PG_RETURN_POINTER(gser);
 }