[SCM] PostGIS branch stable-3.5 updated. 3.5.0-26-gaf101253e

git at osgeo.org git at osgeo.org
Fri Nov 22 18:01:12 PST 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.5 has been updated
       via  af101253e8adbaafe8a7fc7b7879c8770af27d4e (commit)
      from  5314c457fa8cfa0eac19d8e2f1e6e20be129d144 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit af101253e8adbaafe8a7fc7b7879c8770af27d4e
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Nov 22 18:00:27 2024 -0800

    Fix performance regression in ST_Within, closes #5812

diff --git a/postgis/lwgeom_geos_predicates.c b/postgis/lwgeom_geos_predicates.c
index ec97e0185..9074d4ff4 100644
--- a/postgis/lwgeom_geos_predicates.c
+++ b/postgis/lwgeom_geos_predicates.c
@@ -594,8 +594,8 @@ Datum within(PG_FUNCTION_ARGS)
 	POSTGIS_DEBUGF(3, "Contains: type1: %d, type2: %d", gserialized_get_type(geom1), gserialized_get_type(geom2));
 
 	/*
-	** Short-circuit 1: if geom2 bounding box is not completely inside
-	** geom1 bounding box we can return FALSE.
+	** Short-circuit 1: if geom1 bounding box is not completely inside
+	** geom2 bounding box we can return FALSE.
 	*/
 	if (gserialized_get_gbox_p(geom1, &box1) &&
 	    gserialized_get_gbox_p(geom2, &box2))
@@ -620,7 +620,7 @@ Datum within(PG_FUNCTION_ARGS)
 
 	initGEOS(lwpgnotice, lwgeom_geos_error);
 
-	prep_cache = GetPrepGeomCache(fcinfo, shared_geom1, NULL);
+	prep_cache = GetPrepGeomCache(fcinfo, NULL, shared_geom2);
 	if ( prep_cache && prep_cache->prepared_geom && prep_cache->gcache.argnum == 2 )
 	{
 		g1 = POSTGIS2GEOS(geom1);

-----------------------------------------------------------------------

Summary of changes:
 postgis/lwgeom_geos_predicates.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list