[postgis-tickets] r15964 - PgSQL 11 support for 2.4 branch (DatumGetJsonbP macro)

Paul Ramsey pramsey at cleverelephant.ca
Wed Oct 11 06:51:10 PDT 2017


Author: pramsey
Date: 2017-10-11 06:51:10 -0700 (Wed, 11 Oct 2017)
New Revision: 15964

Modified:
   branches/2.4/postgis/mvt.c
Log:
PgSQL 11 support for 2.4 branch (DatumGetJsonbP macro)
Closes #3867



Modified: branches/2.4/postgis/mvt.c
===================================================================
--- branches/2.4/postgis/mvt.c	2017-10-10 22:54:15 UTC (rev 15963)
+++ branches/2.4/postgis/mvt.c	2017-10-11 13:51:10 UTC (rev 15964)
@@ -30,6 +30,11 @@
 #include "utils/jsonb.h"
 #endif
 
+#if POSTGIS_PGSQL_VERSION < 110
+/* See trac ticket #3867 */
+# define DatumGetJsonbP DatumGetJsonb
+#endif
+
 #include "uthash.h"
 
 #define FEATURES_CAPACITY_INITIAL 50
@@ -587,7 +592,7 @@
 		if (k == -1 && typoid != JSONBOID)
 			elog(ERROR, "parse_values: unexpectedly could not find parsed key name '%s'", key);
 		if (typoid == JSONBOID) {
-			tags = parse_jsonb(ctx, DatumGetJsonb(datum), tags);
+			tags = parse_jsonb(ctx, DatumGetJsonbP(datum), tags);
 			continue;
 		}
 #else



More information about the postgis-tickets mailing list