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

Commitedcedcc

Browse files
committed
Add TAP test in pg_dump with --format=tar and --compress
This combination of options has never been supported, and it has neverbeen checked in the regression tests. When building the code withoutzlib support, pg_dump is allowed to run and it generates a warning toinform that any contents are dumped as uncompressed. The tests added bythis commit check both behaviors.Author: Georgios Kokolatos, Rachel HeatonDiscussion:https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03TMm0fBEWveFF9wA1WizPuAgB7Ss=@protonmail.com
1 parentd5a9d86 commitedcedcc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎src/bin/pg_dump/t/001_basic.pl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@
125125
qr/\Qpg_dump: error: -Z\/--compress must be in range 0..9\E/,
126126
'pg_dump: -Z/--compress must be in range');
127127

128+
if (check_pg_config("#define HAVE_LIBZ 1"))
129+
{
130+
command_fails_like(
131+
['pg_dump','--compress','1','--format','tar' ],
132+
qr/\Qpg_dump: error: compression is not supported by tar archive format\E/,
133+
'pg_dump: compression is not supported by tar archive format');
134+
}
135+
else
136+
{
137+
# --jobs > 1 forces an error with tar format.
138+
command_fails_like(
139+
['pg_dump','--compress','1','--format','tar','-j3' ],
140+
qr/\Qpg_dump: warning: requested compression not available in this installation -- archive will be uncompressed\E/,
141+
'pg_dump: warning: compression not available in this installation');
142+
}
143+
128144
command_fails_like(
129145
['pg_dump','--extra-float-digits','-16' ],
130146
qr/\Qpg_dump: error: --extra-float-digits must be in range\E/,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp