mirror of
https://github.com/postgres/postgres.git
synced 2026-04-14 05:27:20 -04:00
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 ...
This commit is contained in:
parent
4cfa8cdfaf
commit
4f6bd8a998
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue