[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.1-28-g7fe4e85

git at osgeo.org git at osgeo.org
Fri Jul 10 05:02:56 PDT 2020


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.0 has been updated
       via  7fe4e853f6517b67f5fcbf81cc2e69c3b90dad64 (commit)
      from  977f7ebf425a0f5d0c4a5d41abb76cf4f27a8bde (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 7fe4e853f6517b67f5fcbf81cc2e69c3b90dad64
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Jul 10 13:58:26 2020 +0200

    Use POSTGIS_DEBUG for debugging

diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index 5fcb3a3..fa4700e 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -1267,13 +1267,13 @@ gserialized_joinsel_internal(PlannerInfo *root, List *args, JoinType jointype, i
 	Var *var1 = (Var*) arg1;
 	Var *var2 = (Var*) arg2;
 
-	elog(DEBUG2, "%s: entered function", __func__);
+	POSTGIS_DEBUGF(2, "%s: entered function", __func__);
 
 	/* We only do column joins right now, no functional joins */
 	/* TODO: handle g1 && ST_Expand(g2) */
 	if (!IsA(arg1, Var) || !IsA(arg2, Var))
 	{
-		elog(DEBUG1, "%s called with arguments that are not column references", __func__);
+		POSTGIS_DEBUGF(1, "%s called with arguments that are not column references", __func__);
 		return DEFAULT_ND_JOINSEL;
 	}
 
@@ -1288,17 +1288,17 @@ gserialized_joinsel_internal(PlannerInfo *root, List *args, JoinType jointype, i
 	/* If we can't get stats, we have to stop here! */
 	if (!stats1)
 	{
-		elog(DEBUG2, "%s: cannot find stats for \"%s\"",  __func__, get_rel_name(relid2) ? get_rel_name(relid2) : "NULL");
+		POSTGIS_DEBUGF(2, "%s: cannot find stats for \"%s\"",  __func__, get_rel_name(relid2) ? get_rel_name(relid2) : "NULL");
 		return DEFAULT_ND_JOINSEL;
 	}
 	else if (!stats2)
 	{
-		elog(DEBUG2, "%s: cannot find stats for \"%s\"",  __func__, get_rel_name(relid2) ? get_rel_name(relid2) : "NULL");
+		POSTGIS_DEBUGF(2, "%s: cannot find stats for \"%s\"",  __func__, get_rel_name(relid2) ? get_rel_name(relid2) : "NULL");
 		return DEFAULT_ND_JOINSEL;
 	}
 
 	selectivity = estimate_join_selectivity(stats1, stats2);
-	elog(DEBUG2, "got selectivity %g", selectivity);
+	POSTGIS_DEBUGF(2, "got selectivity %g", selectivity);
 	pfree(stats1);
 	pfree(stats2);
 	return selectivity;
@@ -1321,19 +1321,19 @@ Datum gserialized_gist_joinsel(PG_FUNCTION_ARGS)
 	JoinType jointype = (JoinType) PG_GETARG_INT16(3);
 	int mode = PG_GETARG_INT32(4);
 
-	elog(DEBUG2, "%s: entered function", __func__);
+	POSTGIS_DEBUGF(2, "%s: entered function", __func__);
 
 	/* Check length of args and punt on > 2 */
 	if (list_length(args) != 2)
 	{
-		elog(DEBUG2, "%s: got nargs == %d", __func__, list_length(args));
+		POSTGIS_DEBUGF(2, "%s: got nargs == %d", __func__, list_length(args));
 		PG_RETURN_FLOAT8(DEFAULT_ND_JOINSEL);
 	}
 
 	/* Only respond to an inner join/unknown context join */
 	if (jointype != JOIN_INNER)
 	{
-		elog(DEBUG1, "%s: jointype %d not supported", __func__, jointype);
+		POSTGIS_DEBUGF(1, "%s: jointype %d not supported", __func__, jointype);
 		PG_RETURN_FLOAT8(DEFAULT_ND_JOINSEL);
 	}
 
@@ -2235,31 +2235,31 @@ gserialized_sel_internal(PlannerInfo *root, List *args, int varRelid, int mode)
 	GBOX search_box;
 	float8 selectivity = 0;
 
-	elog(DEBUG2, "%s: entered function", __func__);
+	POSTGIS_DEBUGF(2, "%s: entered function", __func__);
 
 	if (!get_restriction_variable(root, args, varRelid, &vardata, &other, &varonleft))
 	{
-		elog(DEBUG2, "%s: could not find vardata", __func__);
+		POSTGIS_DEBUGF(2, "%s: could not find vardata", __func__);
 		return DEFAULT_ND_SEL;
 	}
 
 	if (!IsA(other, Const))
 	{
 		ReleaseVariableStats(vardata);
-		elog(DEBUG2, "%s: no constant argument, returning default selectivity %g", __func__, DEFAULT_ND_SEL);
+		POSTGIS_DEBUGF(2, "%s: no constant argument, returning default selectivity %g", __func__, DEFAULT_ND_SEL);
 		return DEFAULT_ND_SEL;
 	}
 
 	if (!gserialized_datum_get_gbox_p(((Const*)other)->constvalue, &search_box))
 	{
 		ReleaseVariableStats(vardata);
-		elog(DEBUG2, "%s: search box is EMPTY", __func__);
+		POSTGIS_DEBUGF(2, "%s: search box is EMPTY", __func__);
 		return 0.0;
 	}
 
 	if (!vardata.statsTuple)
 	{
-		elog(DEBUG1, "%s: no statistics available on table. Empty? Need to ANALYZE?", __func__);
+		POSTGIS_DEBUGF(1, "%s: no statistics available on table. Empty? Need to ANALYZE?", __func__);
 		return DEFAULT_ND_SEL;
 	}
 
@@ -2279,7 +2279,7 @@ Datum gserialized_gist_sel(PG_FUNCTION_ARGS)
 	int varRelid = PG_GETARG_INT32(3);
 	int mode = PG_GETARG_INT32(4);
 	float8 selectivity = gserialized_sel_internal(root, args, varRelid, mode);
-	elog(DEBUG2, "%s: selectivity is %g", __func__, selectivity);
+	POSTGIS_DEBUGF(2, "%s: selectivity is %g", __func__, selectivity);
 	PG_RETURN_FLOAT8(selectivity);
 }
 
@@ -2343,7 +2343,7 @@ Datum gserialized_estimated_extent(PG_FUNCTION_ARGS)
 	/* Read the extent from the head of the spatial index, if there is one */
 	idx_oid = table_get_spatial_index(tbl_oid, col, &key_type);
 	if (!idx_oid)
-		elog(DEBUG2, "index for \"%s.%s\" does not exist", tbl, text_to_cstring(col));
+		POSTGIS_DEBUGF(2, "index for \"%s.%s\" does not exist", tbl, text_to_cstring(col));
 	gbox = spatial_index_read_extent(idx_oid, key_type);
 #endif
 
diff --git a/postgis/gserialized_supportfn.c b/postgis/gserialized_supportfn.c
index ff018a8..d783337 100644
--- a/postgis/gserialized_supportfn.c
+++ b/postgis/gserialized_supportfn.c
@@ -291,7 +291,7 @@ Datum postgis_index_supportfn(PG_FUNCTION_ARGS)
 		{
 			req->selectivity = gserialized_sel_internal(req->root, req->args, req->varRelid, 2);
 		}
-		elog(DEBUG2, "%s: got selectivity %g", __func__, req->selectivity);
+		POSTGIS_DEBUGF(2, "%s: got selectivity %g", __func__, req->selectivity);
 		PG_RETURN_POINTER(req);
 	}
 

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

Summary of changes:
 postgis/gserialized_estimate.c  | 30 +++++++++++++++---------------
 postgis/gserialized_supportfn.c |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list