<div dir="ltr">I think strictness of these functions may be specified by OGC standards...<div><br></div><div><a href="http://www.opengeospatial.org/standards/sfs">http://www.opengeospatial.org/standards/sfs</a><br></div><div><br></div><div>Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 18, 2017 at 9:03 AM, Darafei "Komяpa" Praliaskouski <span dir="ltr"><<a href="mailto:me@komzpa.net" target="_blank">me@komzpa.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font color="#000000">Hi all,</font><div><font color="#000000"><br></font></div><div><font color="#000000">I propose to change strictness for ST_Union, ST_Collect and ST_Difference to non-strict.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">It's common in my workflows to have constructs like </font></div><div><font color="#000000"><br></font></div><div><font color="#000000">ST_Difference(a.geom, (select ST_Union(geom) from clipping_table b where ST_Intersects(a.geom, b.geom)))</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Right now it has not evident side effect of geometries disappearing if ST_Union had no rows to collect. It surely can be fixed with coalesce, but you have to first know of such behavior with NULLs. :)<br><br>So, I propose non-strict handling of nulls:</font></div><div><font color="#000000">ST_Union(A, NULL) => A,</font></div><div><font color="#000000">ST_Union(NULL, A) => A,</font></div><div><font color="#000000">ST_Union(NULL, NULL) => NULL,</font></div><div><font color="#000000">ST_Collect(A, NULL) => A,</font></div><div><font color="#000000">ST_Collect(NULL, A) => A,</font></div><div><font color="#000000">ST_Collect(NULL, NULL) => NULL,</font></div><div><font color="#000000">ST_Difference(A, NULL) = A,</font></div><div><span style="color:rgb(0,0,0)">ST_Difference(NULL, *) = NULL.</span><font color="#000000"><br></font></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">any thoughts?</span></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>