]> granicus.if.org Git - postgis/commitdiff
PgSQL 11 support for 2.4 branch (DatumGetJsonbP macro)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 11 Oct 2017 13:51:10 +0000 (13:51 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 11 Oct 2017 13:51:10 +0000 (13:51 +0000)
Closes #3867

git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@15964 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/mvt.c

index 0924e4ab1e2e0ce5633fc3340994f6ca4845dc3e..5c7fcb18e77196ac636b2841186ece862c6ca4a0 100644 (file)
 #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 @@ static void parse_values(struct mvt_agg_context *ctx)
                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