Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7fcd675

Browse files
committed
When dropping the schema, reconnect as owner of each object.
1 parent 94bf452 commit 7fcd675

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
*
3535
* - Check results of IO routines more carefully.
3636
*
37+
* Modifications - 27-Jan-2001 - pjw@rhyme.com.au
38+
* - When dropping the schema, reconnect as owner of each object.
39+
*
3740
*-------------------------------------------------------------------------
3841
*/
3942

@@ -180,6 +183,9 @@ void RestoreArchive(Archive* AHX, RestoreOptions *ropt)
180183
reqs = _tocEntryRequired(te, ropt);
181184
if ( ( (reqs & 1) != 0) && te->dropStmt) { /* We want the schema */
182185
ahlog(AH, 1, "Dropping %s %s\n", te->desc, te->name);
186+
/* Reconnect if necessary */
187+
_reconnectAsOwner(AH, "-", te);
188+
/* Drop it */
183189
ahprintf(AH, "%s", te->dropStmt);
184190
}
185191
te = te->prev;

src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ typedef z_stream *z_streamp;
6262

6363
#define K_VERS_MAJOR 1
6464
#define K_VERS_MINOR 4
65-
#define K_VERS_REV 24
65+
#define K_VERS_REV 25
6666

6767
/* Data block types */
6868
#define BLK_DATA 1

0 commit comments

Comments
 (0)