From: Philip Warner Date: Sat, 27 Jan 2001 12:35:29 +0000 (+0000) Subject: When dropping the schema, reconnect as owner of each object. X-Git-Tag: REL7_1~626 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fcd675dc34e4621975c356c4c48bcca53c3f322;p=postgresql When dropping the schema, reconnect as owner of each object. --- diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index afbdcadb0a..49389a8c5e 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -34,6 +34,9 @@ * * - Check results of IO routines more carefully. * + * Modifications - 27-Jan-2001 - pjw@rhyme.com.au + * - When dropping the schema, reconnect as owner of each object. + * *------------------------------------------------------------------------- */ @@ -180,6 +183,9 @@ void RestoreArchive(Archive* AHX, RestoreOptions *ropt) reqs = _tocEntryRequired(te, ropt); if ( ( (reqs & 1) != 0) && te->dropStmt) { /* We want the schema */ ahlog(AH, 1, "Dropping %s %s\n", te->desc, te->name); + /* Reconnect if necessary */ + _reconnectAsOwner(AH, "-", te); + /* Drop it */ ahprintf(AH, "%s", te->dropStmt); } te = te->prev; diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 0808af32c8..583ab8dac7 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -62,7 +62,7 @@ typedef z_stream *z_streamp; #define K_VERS_MAJOR 1 #define K_VERS_MINOR 4 -#define K_VERS_REV 24 +#define K_VERS_REV 25 /* Data block types */ #define BLK_DATA 1