public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
Subject: [PATCH 9/9] reuse existing variable by overwriting it
Date: Thu, 12 Mar 2026 16:14:59 +0100

---
 src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index c77564c4024..67442d07ab1 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -250,12 +250,8 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
 	/* ... and the attributes themselves, if any */
 	foreach_ptr(varlena, attr_val, attrs_ext)
 	{
-		varlena    *ext_val;
-		Size		ext_val_size;
-
-		ext_val = detoast_external_attr(attr_val);
-		ext_val_size = VARSIZE_ANY(ext_val);
-		BufFileWrite(file, ext_val, ext_val_size);
+		attr_val = detoast_external_attr(attr_val);
+		BufFileWrite(file, attr_val, VARSIZE_ANY(attr_val));
 	}
 
 	/* Finally write the tuple size ... */
-- 
2.47.3


--pnppmxqkefjd4hu2--





view thread (750+ messages)  latest in thread

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: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH 9/9] reuse existing variable by overwriting it
  In-Reply-To: <no-message-id-1316206@localhost>

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

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