]> granicus.if.org Git - postgresql/commitdiff
Fix pg_dump output to a named tar-file archive.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Jun 2012 01:55:48 +0000 (21:55 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Jun 2012 01:55:48 +0000 (21:55 -0400)
"pg_dump -Ft -f filename ..." got broken by my recent commit
4317e0246c645f60c39e6572644cff1cb03b4c65, which I fear I only tested
in the output-to-stdout variant.

Report and fix by Muhammad Asif Naeem.

src/bin/pg_dump/pg_backup_tar.c

index c5e19968b7c61efe85d5059b94d62287c9d795ec..67527b75850d43011763ac3d722b9ff198bb65fe 100644 (file)
@@ -862,6 +862,7 @@ _CloseArchive(ArchiveHandle *AH)
 
                ropt = NewRestoreOptions();
                memcpy(ropt, AH->ropt, sizeof(RestoreOptions));
+               ropt->filename = NULL;
                ropt->dropSchema = 1;
                ropt->compression = 0;
                ropt->superuser = NULL;