[postgis-tickets] r17557 - Allow FULL OUTER JOIN on geometry.

Darafei komzpa at gmail.com
Sat Jun 22 01:08:41 PDT 2019


Author: komzpa
Date: 2019-06-22 13:08:40 -0700 (Sat, 22 Jun 2019)
New Revision: 17557

Modified:
   trunk/NEWS
   trunk/postgis/postgis.sql.in
   trunk/postgis/postgis_after_upgrade.sql
   trunk/regress/core/tickets.sql
   trunk/regress/core/tickets_expected
Log:
Allow FULL OUTER JOIN on geometry.

Closes #4394
Closes https://github.com/postgis/postgis/pull/409


Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2019-06-22 20:05:00 UTC (rev 17556)
+++ trunk/NEWS	2019-06-22 20:08:40 UTC (rev 17557)
@@ -179,6 +179,7 @@
   - #4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)
   - #4327, Avoid pfree'ing the result of getenv (Raúl Marín)
   - #4406, Throw on invalid characters when decoding geohash (Raúl Marín)
+  - #4394, Allow FULL OUTER JOIN on geometry (Darafei Praliaskouski)
 
 
 PostGIS 2.5.0

Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in	2019-06-22 20:05:00 UTC (rev 17556)
+++ trunk/postgis/postgis.sql.in	2019-06-22 20:08:40 UTC (rev 17557)
@@ -399,7 +399,7 @@
 CREATE OPERATOR = (
 	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
 	COMMUTATOR = '=', -- we might implement a faster negator here
-	RESTRICT = contsel, JOIN = contjoinsel
+	RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
 );
 
 -- Availability: 0.9.0

Modified: trunk/postgis/postgis_after_upgrade.sql
===================================================================
--- trunk/postgis/postgis_after_upgrade.sql	2019-06-22 20:05:00 UTC (rev 17556)
+++ trunk/postgis/postgis_after_upgrade.sql	2019-06-22 20:08:40 UTC (rev 17557)
@@ -232,6 +232,10 @@
 -- See #3460
 UPDATE pg_type SET typlen=16 WHERE typname='pgis_abs' AND typlen=8;
 
+-- #4394
+update pg_operator set oprcanhash = true, oprcanmerge = true where oprname = '=' and oprcode = 'geometry_eq'::regproc;
+
+
 DO language 'plpgsql'
 $$
 BEGIN

Modified: trunk/regress/core/tickets.sql
===================================================================
--- trunk/regress/core/tickets.sql	2019-06-22 20:05:00 UTC (rev 17556)
+++ trunk/regress/core/tickets.sql	2019-06-22 20:08:40 UTC (rev 17557)
@@ -1246,3 +1246,5 @@
 DELETE FROM spatial_ref_sys;
 
 SELECT '#4176', ST_Intersects('POLYGON((0 0, 10 10, 3 5, 0 0))', 'GEOMETRYCOLLECTION(POINT(10 10), LINESTRING(0 0, 3 3))');
+
+with mj as (select 'POINT(0 0)'::geometry geom) select '#4394' from mj a full join mj b on a.geom = b.geom;

Modified: trunk/regress/core/tickets_expected
===================================================================
--- trunk/regress/core/tickets_expected	2019-06-22 20:05:00 UTC (rev 17556)
+++ trunk/regress/core/tickets_expected	2019-06-22 20:08:40 UTC (rev 17557)
@@ -389,3 +389,4 @@
 ERROR:  BOX3D_construct: args can not be empty points
 ERROR:  BOX2D_construct: args can not be empty points
 #4176|t
+#4394



More information about the postgis-tickets mailing list