* by PostgreSQL
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.329 2003/05/08 22:19:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.330 2003/05/17 15:53:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* Dump/restore using COPY */
dumpFn = dumpClasses_nodumpData;
resetPQExpBuffer(copyBuf);
- appendPQExpBuffer(copyBuf, "COPY %s %s %sFROM stdin;\n",
- fmtId(tblinfo[i].relname),
+ /* must use 2 steps here 'cause fmtId is nonreentrant */
+ appendPQExpBuffer(copyBuf, "COPY %s ",
+ fmtId(tblinfo[i].relname));
+ appendPQExpBuffer(copyBuf, "%s %sFROM stdin;\n",
fmtCopyColumnList(&(tblinfo[i])),
(oids && tblinfo[i].hasoids) ? "WITH OIDS " : "");
copyStmt = copyBuf->data;