From: Paul Ramsey Date: Wed, 11 Oct 2017 13:51:10 +0000 (+0000) Subject: PgSQL 11 support for 2.4 branch (DatumGetJsonbP macro) X-Git-Tag: 2.4.1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a57c3bffd7a4170b2aecb31eb01dc0be8f26de5e;p=postgis PgSQL 11 support for 2.4 branch (DatumGetJsonbP macro) Closes #3867 git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@15964 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/mvt.c b/postgis/mvt.c index 0924e4ab1..5c7fcb18e 100644 --- a/postgis/mvt.c +++ b/postgis/mvt.c @@ -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 @@ 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