pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Japin Li <japinli@hotmail.com>
Subject: [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple
Date: Mon, 18 Jan 2021 16:04:54 +0800

---
 src/backend/replication/logical/proto.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

inline patch 1: src/backend/replication/logical/proto.c (+2/-1 lines) download inline-1.patchdiff --git a/src/backend/replication/logical/proto.c b/src/backend/replication/logical/proto.c index 62275ebabe..f2c85cabb5 100644 --- a/src/backend/replication/logical/proto.c +++ b/src/backend/replication/logical/proto.c @@ -493,7 +493,6 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar HeapTuple typtup; Form_pg_type typclass; Form_pg_attribute att = TupleDescAttr(desc, i); - char *outputstr; if (att->attisdropped || att->attgenerated) continue; @@ -537,6 +536,8 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar } else { + char *outputstr; + pq_sendbyte(out, LOGICALREP_COLUMN_TEXT); outputstr = OidOutputFunctionCall(typclass->typoutput, values[i]); pq_sendcountedtext(out, outputstr, strlen(outputstr), false); -- 2.30.0
--=-=-=--

Message-ID: <no-message-id-166721@localhost>
Permalink:  ../no-message-id-166721@localhost/
Also on:    postgresql.org/message-id/no-message-id-166721@localhost

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: japinli@hotmail.com
  Subject: Re: [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple
  In-Reply-To: <no-message-id-166721@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox