public inbox for [email protected]help / color / mirror / Atom feed
[PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple 21+ messages / 1 participants [nested] [flat]
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
* [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple @ 2021-01-18 08:04 Japin Li <[email protected]> 0 siblings, 0 replies; 21+ messages in thread From: Japin Li @ 2021-01-18 08:04 UTC (permalink / raw) --- src/backend/replication/logical/proto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --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 --=-=-=-- ^ permalink raw reply [nested|flat] 21+ messages in thread
end of thread, other threads:[~2021-01-18 08:04 UTC | newest] Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]> 2021-01-18 08:04 [PATCH v2] Narrow the scope of the variable outputstr in logicalrep_write_tuple Japin Li <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox