[SCM] PostGIS branch master updated. 3.5.0-80-g78f164621

git at osgeo.org git at osgeo.org
Fri Nov 22 18:01:07 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, master has been updated
       via  78f1646214ca915fd34580a63989afd772736521 (commit)
      from  3baef024ebacff32572291c6e6497dcb58306582 (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 78f1646214ca915fd34580a63989afd772736521
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