From: Paul Ramsey Date: Thu, 14 Aug 2014 22:53:26 +0000 (+0000) Subject: #2780, Binary insert into geography column results in value being inserted as geometry X-Git-Tag: 2.2.0rc1~890 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b7d493d343299f6ecf42d934977b427b0b1a462;p=postgis #2780, Binary insert into geography column results in value being inserted as geometry git-svn-id: http://svn.osgeo.org/postgis/trunk@12887 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index c4bb01558..f9803814f 100644 --- 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 * diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in index 852e1e110..efccf5c51 100644 --- a/postgis/geography.sql.in +++ b/postgis/geography.sql.in @@ -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 diff --git a/postgis/geography_inout.c b/postgis/geography_inout.c index 94a78c7f2..b18229456 100644 --- a/postgis/geography_inout.c +++ b/postgis/geography_inout.c @@ -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); }