Commit 6a67d9de authored by Tom Lane's avatar Tom Lane

Fix failure to reconnect as sequence's owner before issuing setval().

parent 9a252778
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.40 2002/01/18 19:17:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.41 2002/02/06 17:27:50 tgl Exp $
* *
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
* *
...@@ -311,9 +311,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt) ...@@ -311,9 +311,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */ 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); ahlog(AH, 1, "creating %s %s\n", te->desc, te->name);
_printTocEntry(AH, te, ropt, false); _printTocEntry(AH, te, ropt, false);
defnDumped = true; defnDumped = true;
...@@ -2033,6 +2030,9 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat ...@@ -2033,6 +2030,9 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
{ {
char *pfx; char *pfx;
/* Reconnect if necessary */
_reconnectAsOwner(AH, NULL, te);
if (isData) if (isData)
pfx = "Data for "; pfx = "Data for ";
else else
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.239 2002/01/25 18:49:31 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.240 2002/02/06 17:27:50 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -4765,7 +4765,8 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool ...@@ -4765,7 +4765,8 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
last, (called ? "true" : "false")); last, (called ? "true" : "false"));
ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL, ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "SEQUENCE SET", NULL,
query->data, "" /* Del */ , "", "", NULL, NULL); query->data, "" /* Del */ , "", tbinfo.usename,
NULL, NULL);
} }
if (!dataOnly) if (!dataOnly)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment