Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7969649

Browse files
committed
Minor tweak to avoid unnecessary memory bloat when dumping extremely wide
column values in -d mode. Per report from Marty Scholes. This doesn'tcompletely solve the issue, because we still need multiple copies of thefield value, but at least one copy can be got rid of painlessly ...
1 parent4de12d4 commit7969649

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.401 2005/01/23 00:30:26 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.402 2005/01/26 21:24:12 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -985,7 +985,7 @@ dumpTableData_insert(Archive *fout, void *dcontext)
985985
appendPQExpBuffer(q,fmtId(PQfname(res,field)));
986986
}
987987
appendPQExpBuffer(q,") ");
988-
archprintf(fout,"%s",q->data);
988+
archputs(q->data,fout);
989989
}
990990
archprintf(fout,"VALUES (");
991991
for (field=0;field<nfields;field++)
@@ -1047,7 +1047,7 @@ dumpTableData_insert(Archive *fout, void *dcontext)
10471047
/* All other types are printed as string literals. */
10481048
resetPQExpBuffer(q);
10491049
appendStringLiteral(q,PQgetvalue(res,tuple,field), false);
1050-
archprintf(fout,"%s",q->data);
1050+
archputs(q->data,fout);
10511051
break;
10521052
}
10531053
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp