[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1144-gdc1fe8fa7

git at osgeo.org git at osgeo.org
Wed Jul 5 11:44:48 PDT 2023


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  dc1fe8fa7a66586ec51463fb65a40c47b31e5e24 (commit)
      from  359ac8f9baaf94edbfade1bfaadb3e5231c81f85 (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 dc1fe8fa7a66586ec51463fb65a40c47b31e5e24
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jul 5 11:44:44 2023 -0700

    Support build on pg17, closes #5427

diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index bc1983ff5..ae4f04765 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -1518,10 +1518,15 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu
 	 * Also, if we're sampling a relatively small table, we'll try to ensure that
 	 * we have a smaller grid.
 	 */
+#if POSTGIS_PGSQL_VERSION >= 170
+	histo_cells_target = (int)pow((double)(stats->attstattarget), (double)ndims);
+	POSTGIS_DEBUGF(3, " stats->attstattarget: %d", stats->attstattarget);
+#else
 	histo_cells_target = (int)pow((double)(stats->attr->attstattarget), (double)ndims);
+	POSTGIS_DEBUGF(3, " stats->attr->attstattarget: %d", stats->attr->attstattarget);
+#endif
 	histo_cells_target = Min(histo_cells_target, ndims * 100000);
 	histo_cells_target = Min(histo_cells_target, (int)(10 * ndims * total_rows));
-	POSTGIS_DEBUGF(3, " stats->attr->attstattarget: %d", stats->attr->attstattarget);
 	POSTGIS_DEBUGF(3, " target # of histogram cells: %d", histo_cells_target);
 
 	/* If there's no useful features, we can't work out stats */

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

Summary of changes:
 postgis/gserialized_estimate.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list