]> granicus.if.org Git - postgresql/commitdiff
When dropping the schema, reconnect as owner of each object.
authorPhilip Warner <pjw@rhyme.com.au>
Sat, 27 Jan 2001 12:35:29 +0000 (12:35 +0000)
committerPhilip Warner <pjw@rhyme.com.au>
Sat, 27 Jan 2001 12:35:29 +0000 (12:35 +0000)
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h

index afbdcadb0a2e458835bb65229d641797df3401aa..49389a8c5edda7cde1b23deb007a44c0b42d6417 100644 (file)
@@ -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;
index 0808af32c81adcbb925fa02ded4a3576f8065f79..583ab8dac738dffc4fb83cb53d4da1b95d79bbd1 100644 (file)
@@ -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