diff options
author | Andrew Dunstan | 2025-04-04 21:02:02 +0000 |
---|---|---|
committer | Andrew Dunstan | 2025-04-04 21:07:45 +0000 |
commit | 2ef57908067ab29c22ae13f7775fe2afc330e8f6 (patch) | |
tree | 3664c9c5ff147eda2cf45682daa43629be81e19e /src | |
parent | 8ec0aaeae09482925d2d15ce4a91f6953bdb1566 (diff) |
Fix a couple of error messages and tests for them
oversights in 1495eff7bdb and 289f74d0cb2. Mea culpa.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_restore.c | 6 | ||||
-rw-r--r-- | src/bin/pg_dump/t/001_basic.pl | 4 | ||||
-rw-r--r-- | src/bin/pg_dump/t/006_pg_dumpall.pl | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index ce0c05e4b73..aa2de8b516a 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -505,9 +505,9 @@ main(int argc, char **argv) * dump. */ if (opts->tocSummary) - pg_fatal("option -l/--list cannot be used when restoring an archive created with pg_dumpall"); + pg_fatal("option -l/--list cannot be used when restoring an archive created by pg_dumpall"); else if (opts->tocFile) - pg_fatal("option -L/--use-list cannot be used when restoring an archive created with pg_dumpall"); + pg_fatal("option -L/--use-list cannot be used when restoring an archive created by pg_dumpall"); /* * To restore from a pg_dumpall archive, -C (create database) option @@ -515,7 +515,7 @@ main(int argc, char **argv) */ if (!globals_only && opts->createDB != 1) { - pg_log_error("-C/--create option should be specified when restoring from an archive of created by pg_dumpall"); + pg_log_error("-C/--create option should be specified when restoring an archive created by pg_dumpall"); pg_log_error_hint("Try \"%s --help\" for more information.", progname); pg_log_error_hint("Individual databases can be restored using their specific archives."); exit_nicely(1); diff --git a/src/bin/pg_dump/t/001_basic.pl b/src/bin/pg_dump/t/001_basic.pl index 113a915bfbf..84ca25e17d6 100644 --- a/src/bin/pg_dump/t/001_basic.pl +++ b/src/bin/pg_dump/t/001_basic.pl @@ -244,12 +244,12 @@ command_fails_like( command_fails_like( [ 'pg_restore', '--exclude-database=foo', '-d', 'xxx', 'dumpdir' ], - qr/\Qpg_restore: error: option --exclude-database can be used only when restoring multiple databases by archive of pg_dumpall\E/, + qr/\Qpg_restore: error: option --exclude-database can be used only when restoring an archive created by pg_dumpall\E/, 'When option --exclude-database is used in pg_restore with dump of pg_dump'); command_fails_like( [ 'pg_restore', '--globals-only', '-d', 'xxx', 'dumpdir' ], - qr/\Qpg_restore: error: option -g\/--globals-only can be used only when restoring multiple databases by archive of pg_dumpall\E/, + qr/\Qpg_restore: error: option -g\/--globals-only can be used only when restoring an archive created by pg_dumpall\E/, 'When option --globals-only is not used in pg_restore with dump of pg_dump'); # also fails for -r and -t, but it seems pointless to add more tests for those. diff --git a/src/bin/pg_dump/t/006_pg_dumpall.pl b/src/bin/pg_dump/t/006_pg_dumpall.pl index 44afdf525ff..d6821c5615f 100644 --- a/src/bin/pg_dump/t/006_pg_dumpall.pl +++ b/src/bin/pg_dump/t/006_pg_dumpall.pl @@ -365,7 +365,7 @@ $node->command_fails_like( "$tempdir/format_custom", '--format' => 'custom', '--file' => "$tempdir/error_test.sql", ], - qr/\Qpg_restore: error: -C\/--create option should be specified when restoring multiple databases by archive of pg_dumpall\E/, + qr/\Qpg_restore: error: -C\/--create option should be specified when restoring an archive created by pg_dumpall\E/, 'When -C is not used in pg_restore with dump of pg_dumpall'); # test case 2: When --list option is used with dump of pg_dumpall @@ -374,7 +374,7 @@ $node->command_fails_like( "$tempdir/format_custom", '-C', '--format' => 'custom', '--list', '--file' => "$tempdir/error_test.sql", ], - qr/\Qpg_restore: error: option -l\/--list cannot be used when restoring multiple databases by archive of pg_dumpall\E/, + qr/\Qpg_restore: error: option -l\/--list cannot be used when restoring an archive created by pg_dumpall\E/, 'When --list is used in pg_restore with dump of pg_dumpall'); # test case 3: When non-exist database is given with -d option |