pg_dump tests: don't put dumps in stdout
authorÁlvaro Herrera <[email protected]>
Tue, 25 Nov 2025 18:08:36 +0000 (19:08 +0100)
committerÁlvaro Herrera <[email protected]>
Tue, 25 Nov 2025 18:08:36 +0000 (19:08 +0100)
This bloats the regression log files for no reason.

Backpatch to 18; no further only because it fails to apply cleanly.
(It's just whitespace change that conflicts, but I don't think this
warrants more effort than this.)

Discussion: https://postgr.es/m/202511251218[email protected]

src/bin/pg_dump/t/002_pg_dump.pl

index db610cbacfdec04e52673ecd69cdd8baa4735fbe..eba7d5775b540a47f0b5fa1de81da629bf24e3b0 100644 (file)
@@ -5364,7 +5364,12 @@ $node->command_fails_like(
 # Test dumping pg_catalog (for research -- cannot be reloaded)
 
 $node->command_ok(
-   [ 'pg_dump', '--port' => $port, '--schema' => 'pg_catalog' ],
+   [
+       'pg_dump',
+       '--port' => $port,
+       '--schema' => 'pg_catalog',
+       '--file' => "$tempdir/pgdump_pgcatalog.dmp"
+   ],
    'pg_dump: option -n pg_catalog');
 
 #########################################
@@ -5374,7 +5379,8 @@ $node->command_ok(
    [
        'pg_dumpall',
        '--port' => $port,
-       '--exclude-database' => '"myhost.mydb"'
+       '--exclude-database' => '"myhost.mydb"',
+       '--file' => "$tempdir/pgdumpall.dmp"
    ],
    'pg_dumpall: option --exclude-database handles database names with embedded dots'
 );