Skip to content

Commit 6d8c774

Browse files
committed
Fix breakage induced by recent patch (careless use of fmtId()).
1 parent 86f5fcf commit 6d8c774

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.329 2003/05/08 22:19:56 tgl Exp $
15+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.330 2003/05/17 15:53:12 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -1173,8 +1173,10 @@ dumpClasses(const TableInfo *tblinfo, const int numTables, Archive *fout,
11731173
/* Dump/restore using COPY */
11741174
dumpFn = dumpClasses_nodumpData;
11751175
resetPQExpBuffer(copyBuf);
1176-
appendPQExpBuffer(copyBuf, "COPY %s %s %sFROM stdin;\n",
1177-
fmtId(tblinfo[i].relname),
1176+
/* must use 2 steps here 'cause fmtId is nonreentrant */
1177+
appendPQExpBuffer(copyBuf, "COPY %s ",
1178+
fmtId(tblinfo[i].relname));
1179+
appendPQExpBuffer(copyBuf, "%s %sFROM stdin;\n",
11781180
fmtCopyColumnList(&(tblinfo[i])),
11791181
(oids && tblinfo[i].hasoids) ? "WITH OIDS " : "");
11801182
copyStmt = copyBuf->data;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy