Unnecessary call to resetPQExpBuffer in getIndexes
Hi,
I just noticed that e2c52beecd (adding PeterE in Cc) added a resetPQExpBuffer()
which seems unnecessary since the variable is untouched since the initial
createPQExpBuffer().
Simple patch attached.
Attachments:
v1-0001-Remove-unnecessary-resetPQExpBuffer-call.patchtext/plain; charset=us-asciiDownload
From 1ebddb696af3b77f7d373034b938a358529a9ea1 Mon Sep 17 00:00:00 2001
From: Julien Rouhaud <julien.rouhaud@free.fr>
Date: Wed, 9 Feb 2022 10:36:07 +0800
Subject: [PATCH v1] Remove unnecessary resetPQExpBuffer call.
Oversight in e2c52beecdea152ca680a22ef35c6a7da55aa30f.
---
src/bin/pg_dump/pg_dump.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 3499c0a4d5..3b4b63d897 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -6524,8 +6524,6 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
}
appendPQExpBufferChar(tbloids, '}');
- resetPQExpBuffer(query);
-
appendPQExpBuffer(query,
"SELECT t.tableoid, t.oid, i.indrelid, "
"t.relname AS indexname, "
--
2.35.0
On Wed, Feb 09, 2022 at 10:50:07AM +0800, Julien Rouhaud wrote:
I just noticed that e2c52beecd (adding PeterE in Cc) added a resetPQExpBuffer()
which seems unnecessary since the variable is untouched since the initial
createPQExpBuffer().Simple patch attached.
LGTM
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
On 09.02.22 19:21, Nathan Bossart wrote:
On Wed, Feb 09, 2022 at 10:50:07AM +0800, Julien Rouhaud wrote:
I just noticed that e2c52beecd (adding PeterE in Cc) added a resetPQExpBuffer()
which seems unnecessary since the variable is untouched since the initial
createPQExpBuffer().Simple patch attached.
LGTM
committed
On Thu, Feb 10, 2022 at 12:25:36PM +0100, Peter Eisentraut wrote:
On 09.02.22 19:21, Nathan Bossart wrote:
On Wed, Feb 09, 2022 at 10:50:07AM +0800, Julien Rouhaud wrote:
I just noticed that e2c52beecd (adding PeterE in Cc) added a resetPQExpBuffer()
which seems unnecessary since the variable is untouched since the initial
createPQExpBuffer().Simple patch attached.
LGTM
committed
Thanks!