[SCM] PostGIS branch master updated. 3.6.0rc2-607-g663d84635

git at osgeo.org git at osgeo.org
Thu Jun 18 09:20:31 PDT 2026


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  663d846350266125cbed07fa50e3b534cfc4fe81 (commit)
      from  b1b94b6aaba4ef0c9a5fadc18ef0b7edfb43cda9 (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 663d846350266125cbed07fa50e3b534cfc4fe81
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Thu Jun 18 20:18:07 2026 +0400

    doc: document PostGIS function cost tiers
    
    Document the SQL cost-tier rule of thumb near the shared cost macros so contributors can pick DEFAULT, LOW, MEDIUM, or HIGH consistently.
    
    Clarify that detoasting is not a separate stable multiplier because its cost depends on input size and prior detoasting.
    
    Closes https://github.com/postgis/postgis/pull/933
    
    Closes #2898

diff --git a/NEWS b/NEWS
index 4cf3f5e26..ce02af436 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,8 @@ To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed
 
 * Enhancements *
 
+ - #2898, Document SQL function cost tiers for contributors
+          (Darafei Praliaskouski)
  - #6062, [topology] Stop using recursive snapping, for improved robustness (Sandro Santilli)
  - #6065, Improved winding order computation robustness for rings having collapsed elements
           (Sandro Santilli)
diff --git a/postgis/sqldefines.h.in b/postgis/sqldefines.h.in
index d8bbfa312..4b88a65ba 100644
--- a/postgis/sqldefines.h.in
+++ b/postgis/sqldefines.h.in
@@ -20,7 +20,19 @@
  * where the support functions have been used in
  * place of index SQL inlining.
  * See https://trac.osgeo.org/postgis/ticket/3675
- * for sideffects of costing inlined SQL.
+ * for side effects of costing inlined SQL.
+ *
+ * Cost tiers:
+ * - DEFAULT: metadata, casts, accessors, operators, and index helpers.
+ * - LOW: simple serialization, measurement, or calculation over one value.
+ * - MEDIUM: constructors, parsers, exporters, transforms, or algorithms that
+ *   usually walk most or all coordinates, pixels, or input elements.
+ * - HIGH: expensive GEOS, geography, raster, or multi-input operations where
+ *   planner support functions preserve index-assisted plans.
+ *
+ * These tiers describe planner-visible function work. Do not add a separate
+ * detoasting multiplier here: detoast cost depends on toasted input size and
+ * on whether the datum has already been detoasted before the function call.
  */
 #define _COST_DEFAULT COST 1
 #define _COST_LOW COST 50
@@ -52,4 +64,3 @@
 
 #endif /* _LWPGIS_DEFINES */
 
-

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

Summary of changes:
 NEWS                    |  2 ++
 postgis/sqldefines.h.in | 15 +++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list