Srinivasa R Chava <[EMAIL PROTECTED]> writes: > [ permissions error when restoring a sequence ]
I've applied the attached patch to 7.2 sources to fix this problem. You could probably adapt it to 7.1.3 pg_dump, but I haven't looked. regards, tom lane *** src/bin/pg_dump/pg_backup_archiver.c.orig Fri Jan 18 14:18:18 2002 --- src/bin/pg_dump/pg_backup_archiver.c Wed Feb 6 12:27:50 2002 *************** *** 311,319 **** if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */ { - /* Reconnect if necessary */ - _reconnectAsOwner(AH, NULL, te); - ahlog(AH, 1, "creating %s %s\n", te->desc, te->name); _printTocEntry(AH, te, ropt, false); defnDumped = true; --- 311,316 ---- *************** *** 2032,2037 **** --- 2029,2037 ---- _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isData) { char *pfx; + + /* Reconnect if necessary */ + _reconnectAsOwner(AH, NULL, te); if (isData) pfx = "Data for "; *** src/bin/pg_dump/pg_dump.c.orig Fri Jan 25 13:49:31 2002 --- src/bin/pg_dump/pg_dump.c Wed Feb 6 12:27:50 2002 *************** *** 4765,4771 **** last, (called ? "true" : "false")); ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL, ! query->data, "" /* Del */ , "", "", NULL, NULL); } if (!dataOnly) --- 4765,4772 ---- last, (called ? "true" : "false")); ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL, ! query->data, "" /* Del */ , "", tbinfo.usename, ! NULL, NULL); } if (!dataOnly) ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])