[postgis-tickets] r17292 - Further tweak C function deprecation error

Sandro Santilli strk at kbt.io
Wed Mar 6 06:10:17 PST 2019


Author: strk
Date: 2019-03-06 06:10:17 -0800 (Wed, 06 Mar 2019)
New Revision: 17292

Modified:
   trunk/postgis/postgis_legacy.c
Log:
Further tweak C function deprecation error

This time even with detail and hint !

Modified: trunk/postgis/postgis_legacy.c
===================================================================
--- trunk/postgis/postgis_legacy.c	2019-03-06 10:14:00 UTC (rev 17291)
+++ trunk/postgis/postgis_legacy.c	2019-03-06 14:10:17 UTC (rev 17292)
@@ -41,11 +41,14 @@
 	PG_FUNCTION_INFO_V1(funcname); \
 	Datum funcname(PG_FUNCTION_ARGS) \
 	{ \
-		ereport(ERROR, \
-			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
-			 errmsg("C function %s is out of date since PostGIS %s, do you need to update procs ?", \
-				__func__, \
-				version))); \
+		ereport(ERROR, (\
+			errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
+			errmsg("A stored procedure tried to use deprecated C function '%s'", \
+			       __func__), \
+			errdetail("Library function '%s' was deprecated in PostGIS %s", \
+			          __func__, version), \
+			errhint("Consider running: SELECT postgis_extensions_upgrade()") \
+		)); \
 		PG_RETURN_POINTER(NULL); \
 	}
 



More information about the postgis-tickets mailing list