Skip to content

Commit 82c8b47

Browse files
committed
pg 13 support
1 parent 77b3f82 commit 82c8b47

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN set -x \
77
&& cd /tmp \
88
&& wget -qO- https://github.com/postgres/postgres/archive/REL_11_4.tar.gz | tar xz \
99
# && wget -qO- https://github.com/postgres/postgres/archive/REL_12_1.tar.gz | tar xz \
10+
# && wget -qO- https://github.com/postgres/postgres/archive/REL_13_BETA3.tar.gz | tar xz \
1011
\
1112
&& apk add --no-cache --virtual .build-deps \
1213
--repositories-file /dev/null \

pg_json_decoding.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "utils/syscache.h"
1010
#include "utils/json.h"
1111
#include "utils/builtins.h"
12+
#include "utils/array.h"
1213

1314
PG_MODULE_MAGIC;
1415

@@ -245,7 +246,11 @@ static void pg_decode_message(
245246
appendStringInfoString(ctx->out, ",\"prefix\":");
246247
escape_json(ctx->out, prefix);
247248
message_b64 = palloc0(pg_b64_enc_len(sz) + 1);
248-
pg_b64_encode(message, sz, message_b64);
249+
pg_b64_encode(message, sz, message_b64
250+
#if (PG_VERSION_NUM >= 130000)
251+
,pg_b64_enc_len(sz) + 1
252+
#endif
253+
);
249254
appendStringInfo(ctx->out, ",\"content\":\"%s\"}", message_b64);
250255
pfree(message_b64);
251256
MemoryContextSwitchTo(old);

0 commit comments

Comments
 (0)