summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-01-26 21:24:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-01-26 21:24:27 +0000
commit4f6bd8a998c7656da29bb923a5eda25cd3670225 (patch)
tree351f7a1f0c804888c5bb15469be2c27c227209a8
parent4cfa8cdfaf0506eb3e20699b29c2c4401e04dc02 (diff)
downloadpostgresql-4f6bd8a998c7656da29bb923a5eda25cd3670225.tar.gz
Minor tweak to avoid unnecessary memory bloat when dumping extremely wide
column values in -d mode. Per report from Marty Scholes. This doesn't completely solve the issue, because we still need multiple copies of the field value, but at least one copy can be got rid of painlessly ...
-rw-r--r--src/bin/pg_dump/pg_dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index f5a392ab2b..d28e235e61 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.400.4.1 2005/01/23 00:31:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.400.4.2 2005/01/26 21:24:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -985,7 +985,7 @@ dumpTableData_insert(Archive *fout, void *dcontext)
appendPQExpBuffer(q, fmtId(PQfname(res, field)));
}
appendPQExpBuffer(q, ") ");
- archprintf(fout, "%s", q->data);
+ archputs(q->data, fout);
}
archprintf(fout, "VALUES (");
for (field = 0; field < nfields; field++)
@@ -1047,7 +1047,7 @@ dumpTableData_insert(Archive *fout, void *dcontext)
/* All other types are printed as string literals. */
resetPQExpBuffer(q);
appendStringLiteral(q, PQgetvalue(res, tuple, field), false);
- archprintf(fout, "%s", q->data);
+ archputs(q->data, fout);
break;
}
}