From 3be52db105d78c0f305b2503176adcee78fed49c Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Thu, 2 Jul 2020 12:17:38 -0400 Subject: [PATCH 5/8] Remove C99 declaration and code --- src/backend/replication/logical/proto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/logical/proto.c b/src/backend/replication/logical/proto.c index 6494b645d0..d4c6283a17 100644 --- a/src/backend/replication/logical/proto.c +++ b/src/backend/replication/logical/proto.c @@ -547,10 +547,11 @@ logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple) break; case 'b': /* binary formatted value */ { + int len; tuple->changed[i] = true; tuple->binary[i] = true; - int len = pq_getmsgint(in, 4); /* read length */ + len = pq_getmsgint(in, 4); /* read length */ tuple->values[i].data = palloc(len + 1); /* and data */ @@ -565,8 +566,9 @@ logicalrep_read_tuple(StringInfo in, LogicalRepTupleData *tuple) } case 't': /* text formatted value */ { + int len; tuple->changed[i] = true; - int len = pq_getmsgint(in, 4); /* read length */ + len = pq_getmsgint(in, 4); /* read length */ /* and data */ tuple->values[i].data = palloc(len + 1); -- 2.20.1 (Apple Git-117)