Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23fe7a7

Browse files
committed
Un-break compression of plain-text output format in pg_dump.
pg_dump has historically understood -Z with no -F switch to mean thatit should emit a gzip-compressed version of its plain text output.This got broken through a misunderstanding in the 9.1 patch that addeddirectory output format. Restore the former behavior.Per complaint from Roger Niederland and diagnosis by Adrian Klaver.
1 parent84bbe57 commit23fe7a7

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -528,20 +528,14 @@ main(int argc, char **argv)
528528
exit(1);
529529
}
530530

531+
/* Identify archive format to emit */
531532
archiveFormat=parseArchiveFormat(format,&archiveMode);
532533

533534
/* archiveFormat specific setup */
534535
if (archiveFormat==archNull)
535536
plainText=1;
536537

537-
/*
538-
* Ignore compression level for plain format. XXX: This is a bit
539-
* inconsistent, tar-format throws an error instead.
540-
*/
541-
if (archiveFormat==archNull)
542-
compressLevel=0;
543-
544-
/* Custom and directory formats are compressed by default */
538+
/* Custom and directory formats are compressed by default, others not */
545539
if (compressLevel==-1)
546540
{
547541
if (archiveFormat==archCustom||archiveFormat==archDirectory)
@@ -550,7 +544,7 @@ main(int argc, char **argv)
550544
compressLevel=0;
551545
}
552546

553-
/*open the output file */
547+
/*Open the output file */
554548
g_fout=CreateArchive(filename,archiveFormat,compressLevel,archiveMode);
555549

556550
if (g_fout==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp