Skip to content

Commit 3fd80c7

Browse files
committed
Narrow the scope of a local variable.
This is better style and more symmetrical with the other if-branch. This likely should have been included in 9de77b5 (which created the opportunity), but it was overlooked. Japin Li Discussion: https://postgr.es/m/MEYP282MB16699FA4A7CD57EB250E871FB6A40@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
1 parent a6cf3df commit 3fd80c7

File tree

1 file changed

+2
-1
lines changed
  • src/backend/replication/logical

1 file changed

+2
-1
lines changed

src/backend/replication/logical/proto.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar
493493
HeapTuple typtup;
494494
Form_pg_type typclass;
495495
Form_pg_attribute att = TupleDescAttr(desc, i);
496-
char *outputstr;
497496

498497
if (att->attisdropped || att->attgenerated)
499498
continue;
@@ -537,6 +536,8 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar
537536
}
538537
else
539538
{
539+
char *outputstr;
540+
540541
pq_sendbyte(out, LOGICALREP_COLUMN_TEXT);
541542
outputstr = OidOutputFunctionCall(typclass->typoutput, values[i]);
542543
pq_sendcountedtext(out, outputstr, strlen(outputstr), false);

0 commit comments

Comments
 (0)