-/* Header
-Offset Length Contents
- 0 100 bytes File name ('\0' terminated, 99 maxmum length)
-100 8 bytes File mode (in octal ascii)
-108 8 bytes User ID (in octal ascii)
-116 8 bytes Group ID (in octal ascii)
-124 12 bytes File size (s) (in octal ascii)
-136 12 bytes Modify time (in octal ascii)
-148 8 bytes Header checksum (in octal ascii)
-156 1 bytes Link flag
-157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
-257 8 bytes Magic ("ustar \0")
-265 32 bytes User name ('\0' terminated, 31 maxmum length)
-297 32 bytes Group name ('\0' terminated, 31 maxmum length)
-329 8 bytes Major device ID (in octal ascii)
-337 8 bytes Minor device ID (in octal ascii)
-345 167 bytes Padding
-512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), round up to 512 bytes
-*/
-
-
-
+/*
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.h,v 1.2 2001/03/19 02:35:29 pjw Exp $
+ *
+ * TAR Header
+ *
+ * Offset Length Contents
+ * 0 100 bytes File name ('\0' terminated, 99 maxmum length)
+ * 100 8 bytes File mode (in octal ascii)
+ * 108 8 bytes User ID (in octal ascii)
+ * 116 8 bytes Group ID (in octal ascii)
+ * 124 12 bytes File size (s) (in octal ascii)
+ * 136 12 bytes Modify time (in octal ascii)
+ * 148 8 bytes Header checksum (in octal ascii)
+ * 156 1 bytes Link flag
+ * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
+ * 257 8 bytes Magic ("ustar \0")
+ * 265 32 bytes User name ('\0' terminated, 31 maxmum length)
+ * 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
+ * 329 8 bytes Major device ID (in octal ascii)
+ * 337 8 bytes Minor device ID (in octal ascii)
+ * 345 167 bytes Padding
+ * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), round up to 512 bytes
+ */
/* The linkflag defines the type of file */
#define LF_OLDNORMAL '\0' /* Normal disk file, Unix compatible */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.194 2001/03/06 04:53:28 pjw Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.195 2001/03/19 02:35:29 pjw Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
* I opted for encoding them except in procedure bodies.
* - Dump relevant parts of sequences only when doing schemaOnly & dataOnly
* - Prevent double-dumping of sequences when dataOnly.
- *
+ *
+ * Modifications - 19-Mar-2001 - pjw@rhyme.com.au
+ *
+ * - Remove fmtId calls for all ArchiveEntry name fields. This fixes
+ * quoting problems in trigger enable/disable code for mixed case
+ * table names, and avoids commands like 'pg_restore -t '"TblA"''
+ *
*-------------------------------------------------------------------------
*/
copyStmt = NULL;
}
- ArchiveEntry(fout, tblinfo[i].oid, fmtId(tblinfo[i].relname, false),
+ ArchiveEntry(fout, tblinfo[i].oid, tblinfo[i].relname,
"TABLE DATA", NULL, "", "", copyStmt, tblinfo[i].usename,
dumpFn, dumpCtx);
}
else
appendPQExpBuffer(q, ");\n");
- ArchiveEntry(fout, tinfo[i].oid, fmtId(tinfo[i].typname, force_quotes), "TYPE", NULL,
+ ArchiveEntry(fout, tinfo[i].oid, tinfo[i].typname, "TYPE", NULL,
q->data, delq->data, "", tinfo[i].usename, NULL, NULL);
/*** Dump Type Comments ***/
if (!dataOnly) {
- ArchiveEntry(fout, tblinfo[i].oid, fmtId(tblinfo[i].relname, false),
+ ArchiveEntry(fout, tblinfo[i].oid, tblinfo[i].relname,
reltypename, NULL, q->data, delq->data, "", tblinfo[i].usename,
NULL, NULL);
incby, maxv, minv, cache,
(cycled == 't') ? "cycle" : "");
- ArchiveEntry(fout, tbinfo.oid, fmtId(tbinfo.relname, force_quotes), "SEQUENCE", NULL,
+ ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE", NULL,
query->data, delqry->data, "", tbinfo.usename, NULL, NULL);
}
formatStringLiteral(query, fmtId(tbinfo.relname, force_quotes), CONV_ALL);
appendPQExpBuffer(query, ", %d, '%c');\n", last, called);
- ArchiveEntry(fout, tbinfo.oid, fmtId(tbinfo.relname, force_quotes), "SEQUENCE SET", NULL,
+ ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL,
query->data, "" /* Del */, "", "", NULL, NULL);
}