[postgis-tickets] r15721 - update docs to reflect = operator changed in 2.4.0. correct the examples to exhibit new behavior. Put a note in ~= which means what = used to mean

Regina Obe lr at pcorp.us
Wed Sep 13 14:51:22 PDT 2017


Author: robe
Date: 2017-09-13 14:51:22 -0700 (Wed, 13 Sep 2017)
New Revision: 15721

Modified:
   trunk/doc/reference_operator.xml
Log:
update docs to reflect = operator changed in 2.4.0.  correct the examples to exhibit new behavior.  Put a note in ~= which means what = used to mean
References #3844 for PostGIS 2.4.0

Modified: trunk/doc/reference_operator.xml
===================================================================
--- trunk/doc/reference_operator.xml	2017-09-13 20:31:07 UTC (rev 15720)
+++ trunk/doc/reference_operator.xml	2017-09-13 21:51:22 UTC (rev 15721)
@@ -918,7 +918,8 @@
 		  <refnamediv>
 			<refname>=</refname>
 
-			<refpurpose>Returns <varname>TRUE</varname> if A's bounding box is the same as B's. Uses double precision bounding box.</refpurpose>
+			<refpurpose>Returns <varname>TRUE</varname> if the coordinates and coordinate order geometry/geography A
+			are the same as the coordinates and coordinate order of geometry/geography B.</refpurpose>
 		  </refnamediv>
 
 		  <refsynopsisdiv>
@@ -971,15 +972,18 @@
 			  <para>Only geometry/geography that are exactly equal in all respects,
           with the same coordinates, in the same order, are considered
           equal by this operator. For "spatial equality", that ignores
-          things like coordinate order, and can detect features that 
-          cover the same spatial area with different representations,  
-          use <xref linkend="ST_OrderingEquals" /> 
+          things like coordinate order, and can detect features that
+          cover the same spatial area with different representations,
+          use <xref linkend="ST_OrderingEquals" />
           or <xref linkend="ST_Equals" /></para>
 			</note>
 
 			<caution><para>This operand will NOT make use of any indexes that may be available on the
 				geometries. For an index assisted exact equality test, combine = with &&.</para></caution>
 
+
+			<para>Changed: 2.4.0, in prior versions this was bounding box equality not a geometric equality. If you need bounding box equality, use <xref linkend="ST_Geometry_Same" /> instead.</para>
+
 			<para>&curve_support;</para>
 			<para>&P_support;</para>
 
@@ -991,7 +995,7 @@
 			<programlisting>SELECT 'LINESTRING(0 0, 0 1, 1 0)'::geometry = 'LINESTRING(1 1, 0 0)'::geometry;
  ?column?
 ----------
- t
+ f
 (1 row)
 
 SELECT ST_AsText(column1)
@@ -1010,10 +1014,11 @@
 	('LINESTRING(0 0, 1 1)'::geometry),
 	('LINESTRING(1 1, 0 0)'::geometry)) AS foo
 GROUP BY column1;
-	  st_astext
+      st_astext
 ---------------------
  LINESTRING(0 0,1 1)
-(1 row)
+ LINESTRING(1 1,0 0)
+(2 rows)
 
 -- In versions prior to 2.0, this used to return true --
  SELECT ST_GeomFromText('POINT(1707296.37 4820536.77)') =
@@ -1027,7 +1032,7 @@
 		  <refsection>
 			<title>See Also</title>
 
-			<para><xref linkend="ST_Equals" />, <xref linkend="ST_OrderingEquals" />
+			<para><xref linkend="ST_Equals" />, <xref linkend="ST_OrderingEquals" />, <xref linkend="ST_Geometry_Same" />
 			<!--, <xref linkend="ST_Geometry_LT" />, <xref linkend="ST_Geometry_GT" /> --></para>
 		  </refsection>
 		</refentry>
@@ -1820,8 +1825,7 @@
 			  which behavior your database has. To find out which behavior
 			  your database has you can run the query below.
 				To check for true equality use <xref linkend="ST_OrderingEquals" /> or <xref
-			  linkend="ST_Equals" /> and to check for bounding box equality <xref linkend="ST_Geometry_EQ" />;
-			  operator is a safer option.</para>
+			  linkend="ST_Equals" />.</para>
 			  </warning>
 		  </refsection>
 
@@ -1834,7 +1838,6 @@
 -----------------+
           t    |
 			</programlisting>
-			<para>The above can be used to test if you have the new or old behavior of ~= operator.</para>
 		  </refsection>
 		  <refsection>
 			<title>See Also</title>



More information about the postgis-tickets mailing list