mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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 9de77b545
(which created
the opportunity), but it was overlooked.
Japin Li
Discussion: https://postgr.es/m/MEYP282MB16699FA4A7CD57EB250E871FB6A40@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
This commit is contained in:
@ -493,7 +493,6 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar
|
|||||||
HeapTuple typtup;
|
HeapTuple typtup;
|
||||||
Form_pg_type typclass;
|
Form_pg_type typclass;
|
||||||
Form_pg_attribute att = TupleDescAttr(desc, i);
|
Form_pg_attribute att = TupleDescAttr(desc, i);
|
||||||
char *outputstr;
|
|
||||||
|
|
||||||
if (att->attisdropped || att->attgenerated)
|
if (att->attisdropped || att->attgenerated)
|
||||||
continue;
|
continue;
|
||||||
@ -537,6 +536,8 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple, bool binar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
char *outputstr;
|
||||||
|
|
||||||
pq_sendbyte(out, LOGICALREP_COLUMN_TEXT);
|
pq_sendbyte(out, LOGICALREP_COLUMN_TEXT);
|
||||||
outputstr = OidOutputFunctionCall(typclass->typoutput, values[i]);
|
outputstr = OidOutputFunctionCall(typclass->typoutput, values[i]);
|
||||||
pq_sendcountedtext(out, outputstr, strlen(outputstr), false);
|
pq_sendcountedtext(out, outputstr, strlen(outputstr), false);
|
||||||
|
Reference in New Issue
Block a user