aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-01-23 13:54:24 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-01-23 13:54:24 -0500
commit1042de69dbb6f3c0aa92a741a68aeca23f4ed45e (patch)
tree60deebd9b2b8cd69b4611d830fbfd8e1bfddad16
parentef4edf88df6592b6a29649f3ae69d44cef478291 (diff)
downloadpostgresql-1042de69dbb6f3c0aa92a741a68aeca23f4ed45e.tar.gz
postgresql-1042de69dbb6f3c0aa92a741a68aeca23f4ed45e.zip
pg_dump: avoid useless query in binary_upgrade_set_type_oids_by_type_oid
Commit 6df7a9698 wrote appendPQExpBuffer where it should have written printfPQExpBuffer. This resulted in re-issuing the previous query along with the desired one, which very accidentally had no negative consequences except for some wasted cycles. Back-patch to v14 where that came in. Discussion: https://postgr.es/m/1714711.1642962663@sss.pgh.pa.us
-rw-r--r--src/bin/pg_dump/pg_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 53d3af08feb..30d23032fe8 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -4652,7 +4652,7 @@ binary_upgrade_set_type_oids_by_type_oid(Archive *fout,
{
if (fout->remoteVersion >= 140000)
{
- appendPQExpBuffer(upgrade_query,
+ printfPQExpBuffer(upgrade_query,
"SELECT t.oid, t.typarray "
"FROM pg_catalog.pg_type t "
"JOIN pg_catalog.pg_range r "