Return NULL rather than throwing when a COLLECTION is given to ST_Boundary [RT-SIGTA]
authorSandro Santilli <strk@keybit.net>
Tue, 16 Feb 2010 09:38:30 +0000 (09:38 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 16 Feb 2010 09:38:30 +0000 (09:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5256 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_accessor.xml
postgis/lwgeom_geos.c

index 73b1193835fcfe8e7c4bd27e1984adbb90b4e417..b1cbffd4fca72317cbfafac8d1d6d944ee021487 100644 (file)
@@ -87,9 +87,8 @@
                        geometry primitives as discussed in the OGC SPEC, section
                        3.12.2.</para>
                <para>Performed by the GEOS module</para>
-               <important>
-                 <para>Do not call with a <varname>GEOMETRYCOLLECTION</varname> as an argument</para>
-               </important>
+
+               <note> <para>Prior to 2.0.0, this function throws an exception if used with <varname>GEOMETRYCOLLECTION</varname>. From 2.0.0 up it will return NULL instead (unsupported input).</para></note>
 
                <para>&sfs_compliant; OGC SPEC s2.1.1.1</para>
                <para>&sqlmm_compliant; SQL-MM 3: 5.1.14</para>
index de606b7eb4b064d07be09c3dc768900f9bee501f..e56f403a266fb557f1ce301c292715201fd2db2b 100644 (file)
@@ -883,7 +883,7 @@ Datum boundary(PG_FUNCTION_ARGS)
 
        if (g3 == NULL)
        {
-               elog(ERROR,"GEOS boundary() threw an error!");
+               elog(NOTICE,"GEOSBoundary(): %s", loggederror);
                GEOSGeom_destroy(g1);
                PG_RETURN_NULL(); /* never get here */
        }
@@ -902,7 +902,7 @@ Datum boundary(PG_FUNCTION_ARGS)
                GEOSGeom_destroy(g1);
 
                GEOSGeom_destroy(g3);
-               elog(ERROR,"GEOS boundary() threw an error (result postgis geometry formation)!");
+               elog(NOTICE,"GEOS2POSTGIS threw an error (result postgis geometry formation)!");
                PG_RETURN_NULL(); /* never get here */
        }