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

Commit2ef5790

Browse files
committed
Fix a couple of error messages and tests for them
oversights in1495eff and289f74d. Mea culpa.
1 parent8ec0aae commit2ef5790

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎src/bin/pg_dump/pg_restore.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,17 @@ main(int argc, char **argv)
505505
* dump.
506506
*/
507507
if (opts->tocSummary)
508-
pg_fatal("option -l/--list cannot be used when restoring an archive createdwith pg_dumpall");
508+
pg_fatal("option -l/--list cannot be used when restoring an archive createdby pg_dumpall");
509509
elseif (opts->tocFile)
510-
pg_fatal("option -L/--use-list cannot be used when restoring an archive createdwith pg_dumpall");
510+
pg_fatal("option -L/--use-list cannot be used when restoring an archive createdby pg_dumpall");
511511

512512
/*
513513
* To restore from a pg_dumpall archive, -C (create database) option
514514
* must be specified unless we are only restoring globals.
515515
*/
516516
if (!globals_only&&opts->createDB!=1)
517517
{
518-
pg_log_error("-C/--create option should be specified when restoringfroman archive of created by pg_dumpall");
518+
pg_log_error("-C/--create option should be specified when restoring an archive created by pg_dumpall");
519519
pg_log_error_hint("Try \"%s --help\" for more information.",progname);
520520
pg_log_error_hint("Individual databases can be restored using their specific archives.");
521521
exit_nicely(1);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@
244244

245245
command_fails_like(
246246
['pg_restore','--exclude-database=foo','-d','xxx','dumpdir' ],
247-
qr/\Qpg_restore: error: option --exclude-database can be used only when restoringmultiple databases byarchiveof pg_dumpall\E/,
247+
qr/\Qpg_restore: error: option --exclude-database can be used only when restoringanarchivecreated by pg_dumpall\E/,
248248
'When option --exclude-database is used in pg_restore with dump of pg_dump');
249249

250250
command_fails_like(
251251
['pg_restore','--globals-only','-d','xxx','dumpdir' ],
252-
qr/\Qpg_restore: error: option -g\/--globals-only can be used only when restoringmultiple databases byarchiveof pg_dumpall\E/,
252+
qr/\Qpg_restore: error: option -g\/--globals-only can be used only when restoringanarchivecreated by pg_dumpall\E/,
253253
'When option --globals-only is not used in pg_restore with dump of pg_dump');
254254

255255
# also fails for -r and -t, but it seems pointless to add more tests for those.

‎src/bin/pg_dump/t/006_pg_dumpall.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
"$tempdir/format_custom",
366366
'--format' => 'custom',
367367
'--file' => "$tempdir/error_test.sql", ],
368-
qr/\Qpg_restore: error: -C\/--create option should be specified when restoringmultiple databases byarchiveof pg_dumpall\E/,
368+
qr/\Qpg_restore: error: -C\/--create option should be specified when restoringanarchivecreated by pg_dumpall\E/,
369369
'When -C is not used in pg_restore with dump of pg_dumpall');
370370
371371
# test case 2: When --list option is used with dump of pg_dumpall
@@ -374,7 +374,7 @@
374374
"$tempdir/format_custom", '-C',
375375
'--format' => 'custom', '--list',
376376
'--file' => "$tempdir/error_test.sql", ],
377-
qr/\Qpg_restore: error: option -l\/--list cannot be used when restoringmultiple databases byarchiveof pg_dumpall\E/,
377+
qr/\Qpg_restore: error: option -l\/--list cannot be used when restoringanarchivecreated by pg_dumpall\E/,
378378
'When --list is used in pg_restore with dump of pg_dumpall');
379379
380380
# test case 3: When non-exist database is given with -d option

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp