diff options
| author | Tom Lane | 2005-01-26 21:24:12 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-01-26 21:24:12 +0000 |
| commit | 7969649bd522b66781d8a44eb4d50797e8b3aea0 (patch) | |
| tree | 46518705274746c07d967adb0acba39fedf4247b | |
| parent | 4de12d44703f2a0279d5fdf7a0c93923708fd290 (diff) | |
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.c | 6 |
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 5d1859bd213..ce9a5b0d160 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.401 2005/01/23 00:30:26 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.402 2005/01/26 21:24:12 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; } } |
