mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 17:12:35 +00:00
Fix st_extent on empty relation (#1385)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8451 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
6ef33c6d20
commit
da36dfce37
|
@ -345,7 +345,7 @@ PG_FUNCTION_INFO_V1(BOX3D_combine);
|
|||
Datum BOX3D_combine(PG_FUNCTION_ARGS)
|
||||
{
|
||||
BOX3D *box = (BOX3D*)PG_GETARG_POINTER(0);
|
||||
GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_POINTER(1));
|
||||
GSERIALIZED *geom = PG_ARGISNULL(1) ? NULL : (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_POINTER(1));
|
||||
LWGEOM *lwgeom = NULL;
|
||||
BOX3D *result = NULL;
|
||||
GBOX gbox;
|
||||
|
|
|
@ -458,6 +458,9 @@ SELECT '</#1320>';
|
|||
-- #1344
|
||||
select '#1344', ST_AsEWKB(st_makeline(g)) FROM ( values ('POINT(0 0)'::geometry ) ) as foo(g);
|
||||
|
||||
-- #1385
|
||||
SELECT '#1385', ST_Extent(g) FROM ( select null::geometry as g ) as foo;
|
||||
|
||||
-- Clean up
|
||||
DELETE FROM spatial_ref_sys;
|
||||
|
||||
|
|
|
@ -141,3 +141,4 @@ ERROR: Geometry type (Polygon) does not match column type (MultiPolygon)
|
|||
#1320.geom.3|MULTIPOLYGON|4326
|
||||
</#1320>
|
||||
#1344|\001\002\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
|
||||
#1385|
|
||||
|
|
Loading…
Reference in a new issue