]> granicus.if.org Git - postgresql/commitdiff
Finish pgindent run for 9.6: Perl files.
authorNoah Misch <noah@leadboat.com>
Sun, 12 Jun 2016 08:19:56 +0000 (04:19 -0400)
committerNoah Misch <noah@leadboat.com>
Sun, 12 Jun 2016 08:19:56 +0000 (04:19 -0400)
31 files changed:
contrib/bloom/t/001_wal.pl
src/backend/storage/lmgr/generate-lwlocknames.pl
src/backend/utils/Gen_dummy_probes.pl
src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_dump/t/001_basic.pl
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/pg_rewind/RewindTest.pm
src/interfaces/ecpg/preproc/parse.pl
src/test/modules/commit_ts/t/001_base.pl
src/test/modules/commit_ts/t/002_standby.pl
src/test/modules/commit_ts/t/003_standby_2.pl
src/test/modules/test_pg_dump/t/001_base.pl
src/test/perl/PostgresNode.pm
src/test/perl/RecursiveCopy.pm
src/test/perl/TestLib.pm
src/test/recovery/t/001_stream_rep.pl
src/test/recovery/t/002_archiving.pl
src/test/recovery/t/003_recovery_targets.pl
src/test/recovery/t/004_timeline_switch.pl
src/test/recovery/t/005_replay_delay.pl
src/test/recovery/t/007_sync_rep.pl
src/tools/copyright.pl
src/tools/git_changelog
src/tools/msvc/Install.pm
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm
src/tools/msvc/build.pl
src/tools/msvc/config_default.pl
src/tools/msvc/pgflex.pl
src/tools/msvc/vcregress.pl

index dbb6a905b6097d9b3c7f92bcdc978cd0c3588d2b..56c6618d3d1570fe23edaa4a3773d717ade5b3d2 100644 (file)
@@ -16,7 +16,7 @@ sub test_index_replay
        # Wait for standby to catch up
        my $applname = $node_standby->name;
        my $caughtup_query =
-               "SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
        $node_master->poll_query_until('postgres', $caughtup_query)
          or die "Timed out while waiting for standby 1 to catch up";
 
@@ -56,20 +56,25 @@ $node_standby->start;
 # Create some bloom index on master
 $node_master->psql("postgres", "CREATE EXTENSION bloom;");
 $node_master->psql("postgres", "CREATE TABLE tst (i int4, t text);");
-$node_master->psql("postgres", "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;");
-$node_master->psql("postgres", "CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);");
+$node_master->psql("postgres",
+"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;"
+);
+$node_master->psql("postgres",
+       "CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);");
 
 # Test that queries give same result
 test_index_replay('initial');
 
 # Run 10 cycles of table modification. Run test queries after each modification.
-for my $i (1..10)
+for my $i (1 .. 10)
 {
        $node_master->psql("postgres", "DELETE FROM tst WHERE i = $i;");
        test_index_replay("delete $i");
        $node_master->psql("postgres", "VACUUM tst;");
        test_index_replay("vacuum $i");
        my ($start, $end) = (100001 + ($i - 1) * 10000, 100000 + $i * 10000);
-       $node_master->psql("postgres", "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;");
+       $node_master->psql("postgres",
+"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;"
+       );
        test_index_replay("insert $i");
 }
index c22fbb6cbb2b6658c57a326bfe80fe18a9f3338f..f79d17ca7034b60ec08247dac52ed537cc2acc41 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use strict;
 
 my $lastlockidx = -1;
-my $continue = "\n";
+my $continue    = "\n";
 
 open my $lwlocknames, $ARGV[0] or die;
 
@@ -18,7 +18,7 @@ open H, '>', $htmp or die "Could not open $htmp: $!";
 open C, '>', $ctmp or die "Could not open $ctmp: $!";
 
 my $autogen =
-       "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n";
+"/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n";
 print H $autogen;
 print H "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n";
 print C $autogen, "\n";
@@ -38,7 +38,7 @@ while (<$lwlocknames>)
 
        (my $lockname, my $lockidx) = ($1, $2);
 
-       die "lwlocknames.txt not in order" if $lockidx < $lastlockidx;
+       die "lwlocknames.txt not in order"   if $lockidx < $lastlockidx;
        die "lwlocknames.txt has duplicates" if $lockidx == $lastlockidx;
 
        while ($lastlockidx < $lockidx - 1)
@@ -49,7 +49,7 @@ while (<$lwlocknames>)
        }
        printf C "%s    \"%s\"", $continue, $lockname;
        $lastlockidx = $lockidx;
-       $continue = ",\n";
+       $continue    = ",\n";
 
        print H "#define $lockname (&MainLWLockArray[$lockidx].lock)\n";
 }
index 0499a4cbc97241675e16fb626cd5c4749cfc7e40..318d828c2992de65c2f98a87e7cee774c2abe1a8 100644 (file)
@@ -224,6 +224,7 @@ sub printQ()
        {
                if (ref($q))
                {
+
                        # flush open w files so that reading this file gets it all
                        if (exists($wFiles{$$q}) && $wFiles{$$q} ne '')
                        {
index de05649a33e331137fcd2a5e40c3760ef9d757e7..10e54b157d266199cd8b2a9ebfdcdaa712ae3217 100755 (executable)
@@ -54,8 +54,8 @@ while (<FILE>)
                        || (   ($code >= 0x879a)
                                && ($code <= 0x879c)))
                {
-                       printf STDERR
-                         "Warning: duplicate UTF8: UCS=0x%04x SJIS=0x%04x\n", $ucs,
+                       printf STDERR "Warning: duplicate UTF8: UCS=0x%04x SJIS=0x%04x\n",
+                         $ucs,
                          $code;
                        next;
                }
index f4769bf535d725118681b9a9644f3c02ceba92dd..6c33936d25f02a1d34e3ceabb3c620641ebea10c 100644 (file)
@@ -114,7 +114,8 @@ SKIP:
        mkdir "$tempdir/tblspc1";
        $node->safe_psql('postgres',
                "CREATE TABLESPACE tblspc1 LOCATION '$shorter_tempdir/tblspc1';");
-       $node->safe_psql('postgres', "CREATE TABLE test1 (a int) TABLESPACE tblspc1;");
+       $node->safe_psql('postgres',
+               "CREATE TABLE test1 (a int) TABLESPACE tblspc1;");
        $node->command_ok([ 'pg_basebackup', '-D', "$tempdir/tarbackup2", '-Ft' ],
                'tar format with tablespaces');
        ok(-f "$tempdir/tarbackup2/base.tar", 'backup tar was created');
index 1411ef7a271535d44d4f26e17eb56b59c26af45c..6d545b29e21d44980b399ffe26b32e2f061c1aa6 100644 (file)
@@ -23,14 +23,22 @@ program_options_handling_ok('pg_dump');
 command_exit_is([ 'pg_dump', 'qqq', 'abc' ],
        1, 'pg_dump: too many command-line arguments (first is "asd")');
 
-command_exit_is([ 'pg_dump', '-s', '-a' ],
-       1, 'pg_dump: options -s/--schema-only and -a/--data-only cannot be used together');
-
-command_exit_is([ 'pg_dump', '-c', '-a' ],
-       1, 'pg_dump: options -c/--clean and -a/--data-only cannot be used together');
-
-command_exit_is([ 'pg_dump', '--inserts', '-o' ],
-       1, 'pg_dump: options --inserts/--column-inserts and -o/--oids cannot be used together');
+command_exit_is(
+       [ 'pg_dump', '-s', '-a' ],
+       1,
+'pg_dump: options -s/--schema-only and -a/--data-only cannot be used together'
+);
+
+command_exit_is(
+       [ 'pg_dump', '-c', '-a' ],
+       1,
+       'pg_dump: options -c/--clean and -a/--data-only cannot be used together');
+
+command_exit_is(
+       [ 'pg_dump', '--inserts', '-o' ],
+       1,
+'pg_dump: options --inserts/--column-inserts and -o/--oids cannot be used together'
+);
 
 command_exit_is([ 'pg_dump', '--if-exists' ],
        1, 'pg_dump: option --if-exists requires option -c/--clean');
index 3c6859912f34708eaadd9efefbff5f044936d72b..fd4b9e80a2437aafa693e353c19e6a1ff337c47d 100644 (file)
@@ -42,242 +42,146 @@ my %pgdump_runs = (
                        '-f', "$tempdir/binary_upgrade.sql",
                        '--schema-only',
                        '--binary-upgrade',
-                       '-d', 'postgres', # alternative way to specify database
-               ],
-       },
+                       '-d', 'postgres',    # alternative way to specify database
+               ], },
        clean => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/clean.sql",
                        '-c',
-                       '-d', 'postgres', # alternative way to specify database
-               ],
-       },
+                       '-d', 'postgres',    # alternative way to specify database
+               ], },
        clean_if_exists => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/clean_if_exists.sql",
                        '-c',
                        '--if-exists',
-                       '-E', 'UTF8', # no-op, just tests that option is accepted
-                       'postgres',
-               ],
-       },
+                       '-E', 'UTF8',        # no-op, just tests that option is accepted
+                       'postgres', ], },
        column_inserts => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/column_inserts.sql",
-                       '-a',
-                       '--column-inserts',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                     '-f',
+                       "$tempdir/column_inserts.sql", '-a',
+                       '--column-inserts',            'postgres', ], },
        createdb => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/createdb.sql",
                        '-C',
-                       '-R', # no-op, just for testing
-                       'postgres',
-               ],
-       },
+                       '-R',                # no-op, just for testing
+                       'postgres', ], },
        data_only => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/data_only.sql",
                        '-a',
-                       '-v', # no-op, just make sure it works
-                       'postgres',
-               ],
-       },
+                       '-v',                # no-op, just make sure it works
+                       'postgres', ], },
        defaults => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/defaults.sql",
-                       'postgres',
-               ],
+               dump_cmd => [ 'pg_dump', '-f', "$tempdir/defaults.sql", 'postgres', ],
        },
        defaults_custom_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fc',
-                       '-Z6',
-                       '-f', "$tempdir/defaults_custom_format.dump",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fc', '-Z6', '-f',
+                       "$tempdir/defaults_custom_format.dump", 'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_custom_format.sql",
-                       "$tempdir/defaults_custom_format.dump",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_custom_format.sql",
+                       "$tempdir/defaults_custom_format.dump", ], },
        defaults_dir_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fd',
-                       '-f', "$tempdir/defaults_dir_format",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fd', '-f', "$tempdir/defaults_dir_format",
+                       'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_dir_format.sql",
-                       "$tempdir/defaults_dir_format",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_dir_format.sql",
+                       "$tempdir/defaults_dir_format", ], },
        defaults_parallel => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fd',
-                       '-j2',
-                       '-f', "$tempdir/defaults_parallel",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fd', '-j2', '-f', "$tempdir/defaults_parallel",
+                       'postgres', ],
                restore_cmd => [
-                       'pg_restore',
-                       '-f', "$tempdir/defaults_parallel.sql",
-                       "$tempdir/defaults_parallel",
-               ],
+                       'pg_restore',                     '-f',
+                       "$tempdir/defaults_parallel.sql", "$tempdir/defaults_parallel", ],
        },
        defaults_tar_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Ft',
-                       '-f', "$tempdir/defaults_tar_format.tar",
-                       'postgres',
-               ],
+                       'pg_dump', '-Ft', '-f', "$tempdir/defaults_tar_format.tar",
+                       'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_tar_format.sql",
-                       "$tempdir/defaults_tar_format.tar",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_tar_format.sql",
+                       "$tempdir/defaults_tar_format.tar", ], },
        exclude_dump_test_schema => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/exclude_dump_test_schema.sql",
-                       '-N', 'dump_test',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/exclude_dump_test_schema.sql",
+                       '-N', 'dump_test', 'postgres', ], },
        exclude_test_table => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/exclude_test_table.sql",
-                       '-T', 'dump_test.test_table',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                         '-f',
+                       "$tempdir/exclude_test_table.sql", '-T',
+                       'dump_test.test_table',            'postgres', ], },
        exclude_test_table_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/exclude_test_table_data.sql",
-                       '--exclude-table-data=dump_test.test_table',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f',
+                       "$tempdir/exclude_test_table_data.sql",
+                       '--exclude-table-data=dump_test.test_table', 'postgres', ], },
        pg_dumpall_globals => {
-               dump_cmd => [
-                       'pg_dumpall',
-                       '-f', "$tempdir/pg_dumpall_globals.sql",
-                       '-g',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dumpall', '-f', "$tempdir/pg_dumpall_globals.sql", '-g', ], },
        pg_dumpall_globals_clean => {
                dump_cmd => [
-                       'pg_dumpall',
-                       '-f', "$tempdir/pg_dumpall_globals_clean.sql",
-                       '-g',
-                       '-c',
-               ],
-       },
+                       'pg_dumpall', '-f', "$tempdir/pg_dumpall_globals_clean.sql",
+                       '-g', '-c', ], },
        no_privs => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/no_privs.sql",
-                       '-x',
-                       'postgres',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/no_privs.sql", '-x', 'postgres', ], },
        no_owner => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/no_owner.sql",
-                       '-O',
-                       'postgres',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/no_owner.sql", '-O', 'postgres', ], },
        only_dump_test_schema => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/only_dump_test_schema.sql",
-                       '-n', 'dump_test',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/only_dump_test_schema.sql",
+                       '-n', 'dump_test', 'postgres', ], },
        only_dump_test_table => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/only_dump_test_table.sql",
-                       '-t', 'dump_test.test_table',
-                       '--lock-wait-timeout=1000000',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/only_dump_test_table.sql",
+                       '-t', 'dump_test.test_table', '--lock-wait-timeout=1000000',
+                       'postgres', ], },
        role => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/role.sql",
-                       '--role=dump_test',
-                       '--schema=dump_test_second_schema',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                          '-f',
+                       "$tempdir/role.sql",                '--role=dump_test',
+                       '--schema=dump_test_second_schema', 'postgres', ], },
        schema_only => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/schema_only.sql",
-                       '-s',
-                       'postgres',
-               ],
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/schema_only.sql", '-s', 'postgres', ],
        },
        section_pre_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_pre_data.sql",
-                       '--section=pre-data',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/section_pre_data.sql",
+                       '--section=pre-data', 'postgres', ], },
        section_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_data.sql",
-                       '--section=data',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                   '-f',
+                       "$tempdir/section_data.sql", '--section=data',
+                       'postgres', ], },
        section_post_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_post_data.sql",
-                       '--section=post-data',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/section_post_data.sql",
+                       '--section=post-data', 'postgres', ], },
        test_schema_plus_blobs => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/test_schema_plus_blobs.sql",
-                       '-n', 'dump_test',
-                       '-b',
-                       'postgres',
-               ],
-       },
-);
+                       'pg_dump', '-f', "$tempdir/test_schema_plus_blobs.sql",
+                       '-n', 'dump_test', '-b', 'postgres', ], },);
 
 ###############################################################
 # Definition of the tests to run.
@@ -319,7 +223,7 @@ my %pgdump_runs = (
 my %tests = (
        'ALTER DEFAULT PRIVILEGES FOR ROLE dump_test' => {
                create_order => 14,
-               create_sql => 'ALTER DEFAULT PRIVILEGES
+               create_sql   => 'ALTER DEFAULT PRIVILEGES
                                           FOR ROLE dump_test IN SCHEMA dump_test
                                           GRANT SELECT ON TABLES TO dump_test;',
                regexp => qr/^
@@ -328,28 +232,25 @@ my %tests = (
                        \QGRANT SELECT ON TABLES  TO dump_test;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       no_privs                 => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_pre_data => 1,
-                       section_data => 1,
-               },
-       },
+                       section_pre_data         => 1,
+                       section_data             => 1, }, },
        'ALTER ROLE dump_test' => {
                regexp => qr/^
                        \QALTER ROLE dump_test WITH \E
@@ -357,483 +258,427 @@ my %tests = (
                        \QNOREPLICATION NOBYPASSRLS;\E
                        /xm,
                like => {
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, },
+               unlike => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1,
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'ALTER FUNCTION dump_test.pltestlang_call_handler() OWNER TO' => {
                regexp => qr/^
                        \QALTER FUNCTION dump_test.pltestlang_call_handler() \E
                        \QOWNER TO \E
                        .*;/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+                       only_dump_test_table     => 1, }, },
        'ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO' => {
                regexp => qr/^ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'ALTER SCHEMA dump_test OWNER TO' => {
                regexp => qr/^ALTER SCHEMA dump_test OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1, }, },
        'ALTER SCHEMA dump_test_second_schema OWNER TO' => {
                regexp => qr/^ALTER SCHEMA dump_test_second_schema OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'ALTER TABLE ONLY test_table ADD CONSTRAINT ... PRIMARY KEY' => {
                regexp => qr/^
                        \QALTER TABLE ONLY test_table\E \n^\s+
                        \QADD CONSTRAINT test_table_pkey PRIMARY KEY (col1);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       section_pre_data => 1,
-                       section_data => 1,
-               },
-       },
+                       exclude_test_table       => 1,
+                       section_pre_data         => 1,
+                       section_data             => 1, }, },
        'ALTER TABLE test_table OWNER TO' => {
                regexp => qr/^ALTER TABLE test_table OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1, }, },
        'ALTER TABLE test_table ENABLE ROW LEVEL SECURITY' => {
                create_order => 23,
-               create_sql => 'ALTER TABLE dump_test.test_table
+               create_sql   => 'ALTER TABLE dump_test.test_table
                                           ENABLE ROW LEVEL SECURITY;',
                regexp => qr/^ALTER TABLE test_table ENABLE ROW LEVEL SECURITY;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1, }, },
        'ALTER TABLE test_second_table OWNER TO' => {
                regexp => qr/^ALTER TABLE test_second_table OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1, }, },
        'ALTER TABLE test_third_table OWNER TO' => {
                regexp => qr/^ALTER TABLE test_third_table OWNER TO .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
+
        # catch-all for ALTER ... OWNER (except LARGE OBJECTs)
        'ALTER ... OWNER commands (except LARGE OBJECTs)' => {
                regexp => qr/^ALTER (?!LARGE OBJECT)(.*) OWNER TO .*;/m,
-               like => { }, # use more-specific options above
+               like   => {},    # use more-specific options above
                unlike => {
                        column_inserts => 1,
-                       data_only => 1,
-                       section_data => 1,
-               },
-       },
+                       data_only      => 1,
+                       section_data   => 1, }, },
+
        # catch-all for ALTER TABLE ...
        'ALTER TABLE ... commands' => {
                regexp => qr/^ALTER TABLE .*;/m,
-               like => { }, # use more-specific options above
+               like   => {},                      # use more-specific options above
                unlike => {
-                       column_inserts => 1,
-                       data_only => 1,
-                       pg_dumpall_globals => 1,
+                       column_inserts           => 1,
+                       data_only                => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_data => 1,
-               },
-       },
+                       section_data             => 1, }, },
+
        # catch-all for ALTER ... OWNER
        'ALTER ... OWNER commands' => {
                regexp => qr/^ALTER .* OWNER TO .*;/m,
-               like => { }, # use more-specific options above
+               like   => {},                      # use more-specific options above
                unlike => {
-                       no_owner => 1,
-                       pg_dumpall_globals => 1,
+                       no_owner                 => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
-#      'BLOB load (contents are of test_table)' => {
-#              create_order => 14,
-#              create_sql =>
-#                  "\\o '$tempdir/large_object_test.sql'\n"
-#                . "table dump_test.test_table;\n"
-#                . "\\o\n"
-#                . "\\lo_import '$tempdir/large_object_test.sql'\n",
-#              regexp => qr/^
-#                      \QSELECT pg_catalog.lo_open\E \('\d+',\ \d+\);\n
-#                      \QSELECT pg_catalog.lowrite(0, \E
-#                      \Q'\x310a320a330a340a350a360a370a380a390a');\E\n
-#                      \QSELECT pg_catalog.lo_close(0);\E
-#                      /xm,
-#              like => {
-#                      clean => 1,
-#                      clean_if_exists => 1,
-#                      createdb => 1,
-#                      defaults => 1,
-#                      exclude_dump_test_schema => 1,
-#                      exclude_test_table => 1,
-#                      exclude_test_table_data => 1,
-#                      no_privs => 1,
-#                      section_data => 1,
-#                      test_schema_plus_blobs => 1,
-#              },
-#              unlike => {
-#                      binary_upgrade => 1,
-#                      only_dump_test_schema => 1,
-#                      only_dump_test_table => 1,
-#                      pg_dumpall_globals => 1,
-#                      schema_only => 1,
-#                      section_post_data => 1,
-#              },
-#      },
+                       section_post_data        => 1, }, },
+
+       #       'BLOB load (contents are of test_table)' => {
+       #               create_order => 14,
+       #               create_sql =>
+       #                   "\\o '$tempdir/large_object_test.sql'\n"
+       #                 . "table dump_test.test_table;\n"
+       #                 . "\\o\n"
+       #                 . "\\lo_import '$tempdir/large_object_test.sql'\n",
+       #               regexp => qr/^
+       #                       \QSELECT pg_catalog.lo_open\E \('\d+',\ \d+\);\n
+       #                       \QSELECT pg_catalog.lowrite(0, \E
+       #                       \Q'\x310a320a330a340a350a360a370a380a390a');\E\n
+       #                       \QSELECT pg_catalog.lo_close(0);\E
+       #                       /xm,
+       #               like => {
+       #                       clean => 1,
+       #                       clean_if_exists => 1,
+       #                       createdb => 1,
+       #                       defaults => 1,
+       #                       exclude_dump_test_schema => 1,
+       #                       exclude_test_table => 1,
+       #                       exclude_test_table_data => 1,
+       #                       no_privs => 1,
+       #                       section_data => 1,
+       #                       test_schema_plus_blobs => 1,
+       #               },
+       #               unlike => {
+       #                       binary_upgrade => 1,
+       #                       only_dump_test_schema => 1,
+       #                       only_dump_test_table => 1,
+       #                       pg_dumpall_globals => 1,
+       #                       schema_only => 1,
+       #                       section_post_data => 1,
+       #               },
+       #       },
        'COMMENT ON DATABASE postgres' => {
                regexp => qr/^COMMENT ON DATABASE postgres IS .*;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema => 1,
+                       only_dump_test_table  => 1, }, },
        'COMMENT ON EXTENSION plpgsql' => {
                regexp => qr/^COMMENT ON EXTENSION plpgsql IS .*;/m,
-               like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+               like   => {
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       binary_upgrade        => 1,
+                       only_dump_test_schema => 1,
+                       only_dump_test_table  => 1, }, },
        'COMMENT ON TABLE dump_test.test_table' => {
                create_order => 36,
-               create_sql => 'COMMENT ON TABLE dump_test.test_table
+               create_sql   => 'COMMENT ON TABLE dump_test.test_table
                                           IS \'comment on table\';',
                regexp => qr/^COMMENT ON TABLE test_table IS 'comment on table';/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1, }, },
        'COMMENT ON COLUMN dump_test.test_table.col1' => {
                create_order => 36,
-               create_sql => 'COMMENT ON COLUMN dump_test.test_table.col1
+               create_sql   => 'COMMENT ON COLUMN dump_test.test_table.col1
                                           IS \'comment on column\';',
                regexp => qr/^
                        \QCOMMENT ON COLUMN test_table.col1 IS 'comment on column';\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-               },
-       },
+                       exclude_test_table       => 1, }, },
        'COMMENT ON COLUMN dump_test.composite.f1' => {
                create_order => 44,
-               create_sql => 'COMMENT ON COLUMN dump_test.composite.f1
+               create_sql   => 'COMMENT ON COLUMN dump_test.composite.f1
                                           IS \'comment on column of type\';',
                regexp => qr/^
                        \QCOMMENT ON COLUMN composite.f1 IS 'comment on column of type';\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+                       only_dump_test_table     => 1, }, },
+
        # catch-all for COMMENTs
        'COMMENT commands' => {
                regexp => qr/^COMMENT ON /m,
-               like => { }, # use more-specific options above
+               like   => {},                  # use more-specific options above
                unlike => {
-                       column_inserts => 1,
-                       data_only => 1,
-                       pg_dumpall_globals => 1,
+                       column_inserts           => 1,
+                       data_only                => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_data => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_data             => 1,
+                       section_post_data        => 1, }, },
        'COPY test_table' => {
                create_order => 4,
-               create_sql =>
-                   'INSERT INTO dump_test.test_table (col1) '
+               create_sql   => 'INSERT INTO dump_test.test_table (col1) '
                  . 'SELECT generate_series FROM generate_series(1,9);',
                regexp => qr/^
                        \QCOPY test_table (col1) FROM stdin;\E
                        \n(?:\d\n){9}\\\.\n
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       section_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-               },
-       },
+                       clean                  => 1,
+                       clean_if_exists        => 1,
+                       createdb               => 1,
+                       data_only              => 1,
+                       defaults               => 1,
+                       no_privs               => 1,
+                       no_owner               => 1,
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       section_data           => 1,
+                       test_schema_plus_blobs => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1, }, },
        'COPY fk_reference_test_table' => {
                create_order => 22,
-               create_sql =>
-                   'INSERT INTO dump_test.fk_reference_test_table (col1) '
+               create_sql => 'INSERT INTO dump_test.fk_reference_test_table (col1) '
                  . 'SELECT generate_series FROM generate_series(1,5);',
                regexp => qr/^
                        \QCOPY fk_reference_test_table (col1) FROM stdin;\E
                        \n(?:\d\n){5}\\\.\n
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       data_only               => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       section_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       section_data            => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+                       only_dump_test_table     => 1, }, },
        'COPY fk_reference_test_table second' => {
                regexp => qr/^
                        \QCOPY test_table (col1) FROM stdin;\E
@@ -841,19 +686,14 @@ my %tests = (
                        \QCOPY fk_reference_test_table (col1) FROM stdin;\E
                        \n(?:\d\n){5}\\\.\n
                        /xms,
-               like => {
-                       data_only => 1,
-               },
+               like   => { data_only => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-               },
-       },
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1, }, },
        'COPY test_second_table' => {
                create_order => 7,
-               create_sql =>
-                   'INSERT INTO dump_test.test_second_table (col1, col2) '
+               create_sql => 'INSERT INTO dump_test.test_second_table (col1, col2) '
                  . 'SELECT generate_series, generate_series::text '
                  . 'FROM generate_series(1,9);',
                regexp => qr/^
@@ -861,220 +701,190 @@ my %tests = (
                        \n(?:\d\t\d\n){9}\\\.\n
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       data_only               => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       section_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       section_data            => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-               },
-       },
+                       only_dump_test_table     => 1, }, },
        'COPY test_third_table' => {
                create_order => 12,
                create_sql =>
-                       'INSERT INTO dump_test_second_schema.test_third_table (col1) '
+                 'INSERT INTO dump_test_second_schema.test_third_table (col1) '
                  . 'SELECT generate_series FROM generate_series(1,9);',
                regexp => qr/^
                        \QCOPY test_third_table (col1) FROM stdin;\E
                        \n(?:\d\n){9}\\\.\n
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       section_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       data_only                => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       section_data             => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'INSERT INTO test_table' => {
                regexp => qr/^
                        (?:INSERT\ INTO\ test_table\ \(col1\)\ VALUES\ \(\d\);\n){9}
                        /xm,
-               like => {
-                       column_inserts => 1,
-               },
-               unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       section_data => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => { column_inserts => 1, },
+               unlike => {
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       data_only                => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       section_data             => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'INSERT INTO test_second_table' => {
                regexp => qr/^
                        (?:INSERT\ INTO\ test_second_table\ \(col1,\ col2\)
                           \ VALUES\ \(\d,\ '\d'\);\n){9}/xm,
-               like => {
-                       column_inserts => 1,
-               },
-               unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       section_data => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => { column_inserts => 1, },
+               unlike => {
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       data_only                => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       section_data             => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'INSERT INTO test_third_table' => {
                regexp => qr/^
                        (?:INSERT\ INTO\ test_third_table\ \(col1\)
                           \ VALUES\ \(\d\);\n){9}/xm,
-               like => {
-                       column_inserts => 1,
-               },
-               unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       section_data => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
-       'COPY ... commands' => { # catch-all for COPY
+               like   => { column_inserts => 1, },
+               unlike => {
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       data_only                => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       section_data             => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       test_schema_plus_blobs   => 1, }, },
+       'COPY ... commands' => {    # catch-all for COPY
                regexp => qr/^COPY /m,
-               like => { }, # use more-specific options above
+               like   => {},            # use more-specific options above
                unlike => {
-                       binary_upgrade => 1,
-                       column_inserts => 1,
-                       pg_dumpall_globals => 1,
+                       binary_upgrade           => 1,
+                       column_inserts           => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-               },
-       },
+                       schema_only              => 1,
+                       section_post_data        => 1, }, },
        'CREATE ROLE dump_test' => {
                create_order => 1,
-               create_sql => 'CREATE ROLE dump_test;',
-               regexp => qr/^CREATE ROLE dump_test;/m,
-               like => {
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               create_sql   => 'CREATE ROLE dump_test;',
+               regexp       => qr/^CREATE ROLE dump_test;/m,
+               like         => {
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, },
+               unlike => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1,
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE DATABASE postgres' => {
                regexp => qr/^
                        \QCREATE DATABASE postgres WITH TEMPLATE = template0 \E
                        .*;/xm,
-               like => {
-                       createdb => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               like   => { createdb => 1, },
+               unlike => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       schema_only              => 1,
+                       section_pre_data         => 1,
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE EXTENSION ... plpgsql' => {
                regexp => qr/^
                        \QCREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\E
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       binary_upgrade           => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE AGGREGATE dump_test.newavg' => {
                create_order => 25,
-               create_sql => 'CREATE AGGREGATE dump_test.newavg (
+               create_sql   => 'CREATE AGGREGATE dump_test.newavg (
                                                  sfunc = int4_avg_accum,
                                                  basetype = int4,
                                                  stype = _int8,
@@ -1089,31 +899,28 @@ my %tests = (
                        \n\s+\QFINALFUNC = int8_avg\E
                        \n\);/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE DOMAIN dump_test.us_postal_code' => {
                create_order => 29,
-               create_sql => 'CREATE DOMAIN dump_test.us_postal_code AS TEXT
+               create_sql   => 'CREATE DOMAIN dump_test.us_postal_code AS TEXT
                                           CHECK(VALUE ~ \'^\d{5}$\' OR
                                                         VALUE ~ \'^\d{5}-\d{4}$\');',
                regexp => qr/^
@@ -1125,31 +932,28 @@ my %tests = (
                        \Q'::text)));\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FUNCTION dump_test.pltestlang_call_handler' => {
                create_order => 17,
-               create_sql => 'CREATE FUNCTION dump_test.pltestlang_call_handler()
+               create_sql   => 'CREATE FUNCTION dump_test.pltestlang_call_handler()
                                           RETURNS LANGUAGE_HANDLER AS \'$libdir/plpgsql\',
                                           \'plpgsql_call_handler\' LANGUAGE C;',
                regexp => qr/^
@@ -1160,31 +964,28 @@ my %tests = (
                        \Qlibdir\/plpgsql', 'plpgsql_call_handler';\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FUNCTION dump_test.trigger_func' => {
                create_order => 30,
-               create_sql => 'CREATE FUNCTION dump_test.trigger_func()
+               create_sql   => 'CREATE FUNCTION dump_test.trigger_func()
                                           RETURNS trigger LANGUAGE plpgsql
                                           AS $$ BEGIN RETURN NULL; END;$$;',
                regexp => qr/^
@@ -1194,31 +995,28 @@ my %tests = (
                        \Q BEGIN RETURN NULL; END;\E
                        \$\$;/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FUNCTION dump_test.event_trigger_func' => {
                create_order => 32,
-               create_sql => 'CREATE FUNCTION dump_test.event_trigger_func()
+               create_sql   => 'CREATE FUNCTION dump_test.event_trigger_func()
                                           RETURNS event_trigger LANGUAGE plpgsql
                                           AS $$ BEGIN RETURN; END;$$;',
                regexp => qr/^
@@ -1228,31 +1026,28 @@ my %tests = (
                        \Q BEGIN RETURN; END;\E
                        \$\$;/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE EVENT TRIGGER test_event_trigger' => {
                create_order => 33,
-               create_sql => 'CREATE EVENT TRIGGER test_event_trigger
+               create_sql   => 'CREATE EVENT TRIGGER test_event_trigger
                                           ON ddl_command_start
                                           EXECUTE PROCEDURE dump_test.event_trigger_func();',
                regexp => qr/^
@@ -1261,31 +1056,28 @@ my %tests = (
                        \n\s+\QEXECUTE PROCEDURE dump_test.event_trigger_func();\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_post_data        => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE TRIGGER test_trigger' => {
                create_order => 31,
-               create_sql => 'CREATE TRIGGER test_trigger
+               create_sql   => 'CREATE TRIGGER test_trigger
                                           BEFORE INSERT ON dump_test.test_table
                                           FOR EACH ROW WHEN (NEW.col1 > 10)
                                           EXECUTE PROCEDURE dump_test.trigger_func();',
@@ -1295,31 +1087,28 @@ my %tests = (
                        \QEXECUTE PROCEDURE trigger_func();\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE TYPE dump_test.planets AS ENUM' => {
                create_order => 37,
-               create_sql => 'CREATE TYPE dump_test.planets
+               create_sql   => 'CREATE TYPE dump_test.planets
                                           AS ENUM ( \'venus\', \'earth\', \'mars\' );',
                regexp => qr/^
                        \QCREATE TYPE planets AS ENUM (\E
@@ -1328,27 +1117,24 @@ my %tests = (
                        \n\s+'mars'
                        \n\);/xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TYPE dump_test.planets AS ENUM pg_upgrade' => {
                regexp => qr/^
                        \QCREATE TYPE planets AS ENUM (\E
@@ -1359,32 +1145,28 @@ my %tests = (
                        \n.*^
                        \QALTER TYPE dump_test.planets ADD VALUE 'mars';\E
                        \n/xms,
-               like => {
-                       binary_upgrade => 1,
-               },
-               unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               like   => { binary_upgrade => 1, },
+               unlike => {
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       only_dump_test_schema    => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1,
+                       test_schema_plus_blobs   => 1,
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TYPE dump_test.textrange AS RANGE' => {
                create_order => 38,
-               create_sql => 'CREATE TYPE dump_test.textrange
+               create_sql   => 'CREATE TYPE dump_test.textrange
                                           AS RANGE (subtype=text, collation="C");',
                regexp => qr/^
                        \QCREATE TYPE textrange AS RANGE (\E
@@ -1392,56 +1174,50 @@ my %tests = (
                        \n\s+\Qcollation = pg_catalog."C"\E
                        \n\);/xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TYPE dump_test.int42' => {
                create_order => 39,
-               create_sql => 'CREATE TYPE dump_test.int42;',
-               regexp => qr/^CREATE TYPE int42;/m,
-               like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               create_sql   => 'CREATE TYPE dump_test.int42;',
+               regexp       => qr/^CREATE TYPE int42;/m,
+               like         => {
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FUNCTION dump_test.int42_in' => {
                create_order => 40,
-               create_sql => 'CREATE FUNCTION dump_test.int42_in(cstring)
+               create_sql   => 'CREATE FUNCTION dump_test.int42_in(cstring)
                                           RETURNS dump_test.int42 AS \'int4in\'
                                           LANGUAGE internal STRICT IMMUTABLE;',
                regexp => qr/^
@@ -1450,31 +1226,28 @@ my %tests = (
                        \n\s+AS\ \$\$int4in\$\$;
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FUNCTION dump_test.int42_out' => {
                create_order => 41,
-               create_sql => 'CREATE FUNCTION dump_test.int42_out(dump_test.int42)
+               create_sql   => 'CREATE FUNCTION dump_test.int42_out(dump_test.int42)
                                           RETURNS cstring AS \'int4out\'
                                           LANGUAGE internal STRICT IMMUTABLE;',
                regexp => qr/^
@@ -1483,31 +1256,28 @@ my %tests = (
                        \n\s+AS\ \$\$int4out\$\$;
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TYPE dump_test.int42 populated' => {
                create_order => 42,
-               create_sql => 'CREATE TYPE dump_test.int42 (
+               create_sql   => 'CREATE TYPE dump_test.int42 (
                                                   internallength = 4,
                                                   input = dump_test.int42_in,
                                                   output = dump_test.int42_out,
@@ -1525,30 +1295,27 @@ my %tests = (
                        \n\s+PASSEDBYVALUE\n\);
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TYPE dump_test.composite' => {
                create_order => 43,
-               create_sql => 'CREATE TYPE dump_test.composite AS (
+               create_sql   => 'CREATE TYPE dump_test.composite AS (
                                                   f1 int,
                                                   f2 dump_test.int42
                                           );',
@@ -1559,83 +1326,74 @@ my %tests = (
                        \n\);
                        /xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE FOREIGN DATA WRAPPER dummy' => {
                create_order => 35,
-               create_sql => 'CREATE FOREIGN DATA WRAPPER dummy;',
-               regexp => qr/CREATE FOREIGN DATA WRAPPER dummy;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               create_sql   => 'CREATE FOREIGN DATA WRAPPER dummy;',
+               regexp       => qr/CREATE FOREIGN DATA WRAPPER dummy;/m,
+               like         => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy' => {
                create_order => 36,
-               create_sql => 'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;',
-               regexp => qr/CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               create_sql   => 'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;',
+               regexp       => qr/CREATE SERVER s1 FOREIGN DATA WRAPPER dummy;/m,
+               like         => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
 #######################################
-# Currently broken.
+       # Currently broken.
 #######################################
 #
 #      'CREATE TRANSFORM FOR int' => {
@@ -1666,38 +1424,35 @@ my %tests = (
 #      },
        'CREATE LANGUAGE pltestlang' => {
                create_order => 18,
-               create_sql => 'CREATE LANGUAGE pltestlang
+               create_sql   => 'CREATE LANGUAGE pltestlang
                                           HANDLER dump_test.pltestlang_call_handler;',
                regexp => qr/^
                        \QCREATE PROCEDURAL LANGUAGE pltestlang \E
                        \QHANDLER pltestlang_call_handler;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       only_dump_test_schema => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       only_dump_test_schema    => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE MATERIALIZED VIEW matview' => {
                create_order => 20,
-               create_sql => 'CREATE MATERIALIZED VIEW dump_test.matview (col1) AS
+               create_sql   => 'CREATE MATERIALIZED VIEW dump_test.matview (col1) AS
                                           SELECT * FROM dump_test.test_table;',
                regexp => qr/^
                        \QCREATE MATERIALIZED VIEW matview AS\E
@@ -1706,31 +1461,28 @@ my %tests = (
                        \n\s+\QWITH NO DATA;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE MATERIALIZED VIEW matview_second' => {
                create_order => 21,
-               create_sql => 'CREATE MATERIALIZED VIEW
+               create_sql   => 'CREATE MATERIALIZED VIEW
                                                   dump_test.matview_second (col1) AS
                                                   SELECT * FROM dump_test.matview;',
                regexp => qr/^
@@ -1740,31 +1492,28 @@ my %tests = (
                        \n\s+\QWITH NO DATA;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE POLICY p1 ON test_table' => {
                create_order => 22,
-               create_sql => 'CREATE POLICY p1 ON dump_test.test_table
+               create_sql   => 'CREATE POLICY p1 ON dump_test.test_table
                                                   USING (true)
                                                   WITH CHECK (true);',
                regexp => qr/^
@@ -1772,209 +1521,188 @@ my %tests = (
                        \QUSING (true) WITH CHECK (true);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE POLICY p2 ON test_table FOR SELECT' => {
                create_order => 24,
-               create_sql => 'CREATE POLICY p2 ON dump_test.test_table
+               create_sql   => 'CREATE POLICY p2 ON dump_test.test_table
                                                   FOR SELECT TO dump_test USING (true);',
                regexp => qr/^
                        \QCREATE POLICY p2 ON test_table FOR SELECT TO dump_test \E
                        \QUSING (true);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE POLICY p3 ON test_table FOR INSERT' => {
                create_order => 25,
-               create_sql => 'CREATE POLICY p3 ON dump_test.test_table
+               create_sql   => 'CREATE POLICY p3 ON dump_test.test_table
                                                   FOR INSERT TO dump_test WITH CHECK (true);',
                regexp => qr/^
                        \QCREATE POLICY p3 ON test_table FOR INSERT \E
                        \QTO dump_test WITH CHECK (true);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE POLICY p4 ON test_table FOR UPDATE' => {
                create_order => 26,
-               create_sql => 'CREATE POLICY p4 ON dump_test.test_table FOR UPDATE
+               create_sql   => 'CREATE POLICY p4 ON dump_test.test_table FOR UPDATE
                                                   TO dump_test USING (true) WITH CHECK (true);',
                regexp => qr/^
                        \QCREATE POLICY p4 ON test_table FOR UPDATE TO dump_test \E
                        \QUSING (true) WITH CHECK (true);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE POLICY p5 ON test_table FOR DELETE' => {
                create_order => 27,
-               create_sql => 'CREATE POLICY p5 ON dump_test.test_table
+               create_sql   => 'CREATE POLICY p5 ON dump_test.test_table
                                                   FOR DELETE TO dump_test USING (true);',
                regexp => qr/^
                        \QCREATE POLICY p5 ON test_table FOR DELETE \E
                        \QTO dump_test USING (true);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       section_pre_data => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       section_pre_data         => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
+                       pg_dumpall_globals_clean => 1, }, },
        'CREATE SCHEMA dump_test' => {
                create_order => 2,
-               create_sql => 'CREATE SCHEMA dump_test;',
-               regexp => qr/^CREATE SCHEMA dump_test;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               create_sql   => 'CREATE SCHEMA dump_test;',
+               regexp       => qr/^CREATE SCHEMA dump_test;/m,
+               like         => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE SCHEMA dump_test_second_schema' => {
                create_order => 9,
-               create_sql => 'CREATE SCHEMA dump_test_second_schema;',
-               regexp => qr/^CREATE SCHEMA dump_test_second_schema;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+               create_sql   => 'CREATE SCHEMA dump_test_second_schema;',
+               regexp       => qr/^CREATE SCHEMA dump_test_second_schema;/m,
+               like         => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE TABLE test_table' => {
                create_order => 3,
-               create_sql => 'CREATE TABLE dump_test.test_table (
+               create_sql   => 'CREATE TABLE dump_test.test_table (
                                                   col1 serial primary key,
                                                   CHECK (col1 <= 1000)
                                           );',
@@ -1985,31 +1713,28 @@ my %tests = (
                        \Q((col1 <= 1000))\E
                        \n\);/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TABLE fk_reference_test_table' => {
                create_order => 21,
-               create_sql => 'CREATE TABLE dump_test.fk_reference_test_table (
+               create_sql   => 'CREATE TABLE dump_test.fk_reference_test_table (
                                                   col1 int primary key references dump_test.test_table
                                           );',
                regexp => qr/^
@@ -2018,31 +1743,28 @@ my %tests = (
                        \n\);
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TABLE test_second_table' => {
                create_order => 6,
-               create_sql => 'CREATE TABLE dump_test.test_second_table (
+               create_sql   => 'CREATE TABLE dump_test.test_second_table (
                                                   col1 int,
                                                   col2 text
                                           );',
@@ -2053,28 +1775,25 @@ my %tests = (
                        \n\);
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE TABLE test_third_table' => {
                create_order => 11,
                create_sql => 'CREATE TABLE dump_test_second_schema.test_third_table (
@@ -2086,28 +1805,25 @@ my %tests = (
                        \n\);
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE SEQUENCE test_table_col1_seq' => {
                regexp => qr/^
                        \QCREATE SEQUENCE test_table_col1_seq\E
@@ -2118,28 +1834,25 @@ my %tests = (
                        \n\s+\QCACHE 1;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       pg_dumpall_globals => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data        => 1, }, },
        'CREATE SEQUENCE test_third_table_col1_seq' => {
                regexp => qr/^
                        \QCREATE SEQUENCE test_third_table_col1_seq\E
@@ -2150,430 +1863,311 @@ my %tests = (
                        \n\s+\QCACHE 1;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       section_post_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       section_post_data        => 1,
+                       test_schema_plus_blobs   => 1, }, },
        'CREATE UNIQUE INDEX test_third_table_idx ON test_third_table' => {
                create_order => 13,
-               create_sql => 'CREATE UNIQUE INDEX test_third_table_idx
+               create_sql   => 'CREATE UNIQUE INDEX test_third_table_idx
                                           ON dump_test_second_schema.test_third_table (col1);',
                regexp => qr/^
                        \QCREATE UNIQUE INDEX test_third_table_idx \E
                        \QON test_third_table USING btree (col1);\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_post_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_post_data        => 1, },
+               unlike => {
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
                        pg_dumpall_globals_clean => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
-       'CREATE ... commands' => { # catch-all for CREATE
+                       test_schema_plus_blobs   => 1, }, },
+       'CREATE ... commands' => {    # catch-all for CREATE
                regexp => qr/^CREATE /m,
-               like => { }, # use more-specific options above
+               like   => {},              # use more-specific options above
                unlike => {
                        column_inserts => 1,
-                       data_only => 1,
-                       section_data => 1,
-               },
-       },
+                       data_only      => 1,
+                       section_data   => 1, }, },
        'DROP EXTENSION plpgsql' => {
                regexp => qr/^DROP EXTENSION plpgsql;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP FUNCTION dump_test.pltestlang_call_handler()' => {
                regexp => qr/^DROP FUNCTION dump_test\.pltestlang_call_handler\(\);/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP LANGUAGE pltestlang' => {
                regexp => qr/^DROP PROCEDURAL LANGUAGE pltestlang;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP SCHEMA dump_test' => {
                regexp => qr/^DROP SCHEMA dump_test;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP SCHEMA dump_test_second_schema' => {
                regexp => qr/^DROP SCHEMA dump_test_second_schema;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP TABLE test_table' => {
                regexp => qr/^DROP TABLE dump_test\.test_table;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP TABLE fk_reference_test_table' => {
                regexp => qr/^DROP TABLE dump_test\.fk_reference_test_table;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP TABLE test_second_table' => {
                regexp => qr/^DROP TABLE dump_test\.test_second_table;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP TABLE test_third_table' => {
                regexp => qr/^DROP TABLE dump_test_second_schema\.test_third_table;/m,
-               like => {
-                       clean => 1,
-               },
-               unlike => {
-                       clean_if_exists => 1,
-               },
-       },
+               like   => { clean => 1, },
+               unlike => { clean_if_exists => 1, }, },
        'DROP EXTENSION IF EXISTS plpgsql' => {
                regexp => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler()' => {
                regexp => qr/^
                        \QDROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler();\E
                        /xm,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean           => 1, }, },
        'DROP LANGUAGE IF EXISTS pltestlang' => {
                regexp => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP SCHEMA IF EXISTS dump_test' => {
                regexp => qr/^DROP SCHEMA IF EXISTS dump_test;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP SCHEMA IF EXISTS dump_test_second_schema' => {
                regexp => qr/^DROP SCHEMA IF EXISTS dump_test_second_schema;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP TABLE IF EXISTS test_table' => {
                regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP TABLE IF EXISTS test_second_table' => {
                regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_second_table;/m,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean => 1, }, },
        'DROP TABLE IF EXISTS test_third_table' => {
                regexp => qr/^
                        \QDROP TABLE IF EXISTS dump_test_second_schema.test_third_table;\E
                        /xm,
-               like => {
-                       clean_if_exists => 1,
-               },
-               unlike => {
-                       clean => 1,
-               },
-       },
+               like   => { clean_if_exists => 1, },
+               unlike => { clean           => 1, }, },
        'DROP ROLE dump_test' => {
                regexp => qr/^
                        \QDROP ROLE dump_test;\E
                        /xm,
-               like => {
-                       pg_dumpall_globals_clean => 1,
-               },
+               like   => { pg_dumpall_globals_clean => 1, },
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-               },
-       },
+                       clean           => 1,
+                       clean_if_exists => 1, }, },
        'DROP ROLE pg_' => {
                regexp => qr/^
                        \QDROP ROLE pg_\E.*;
                        /xm,
-               like => {
-               },
+               like   => {},
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       pg_dumpall_globals_clean => 1,
-               },
-       },
-       'DROP ... commands' => { # catch-all for DROP
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       pg_dumpall_globals_clean => 1, }, },
+       'DROP ... commands' => {    # catch-all for DROP
                regexp => qr/^DROP /m,
-               like => { }, # use more-specific options above
-               unlike => {
-                       binary_upgrade => 1,
-                       column_inserts => 1,
-                       createdb => 1,
-                       data_only => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       schema_only => 1,
-               },
-       },
+               like   => {},            # use more-specific options above
+               unlike => {
+                       binary_upgrade           => 1,
+                       column_inserts           => 1,
+                       createdb                 => 1,
+                       data_only                => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_privs                 => 1,
+                       no_owner                 => 1,
+                       only_dump_test_schema    => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
+                       schema_only              => 1, }, },
        'GRANT USAGE ON SCHEMA dump_test_second_schema' => {
                create_order => 10,
-               create_sql => 'GRANT USAGE ON SCHEMA dump_test_second_schema
+               create_sql   => 'GRANT USAGE ON SCHEMA dump_test_second_schema
                                                   TO dump_test;',
                regexp => qr/^
                        \QGRANT USAGE ON SCHEMA dump_test_second_schema TO dump_test;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       pg_dumpall_globals     => 1,
+                       test_schema_plus_blobs => 1, }, },
        'GRANT SELECT ON TABLE test_table' => {
                create_order => 5,
-               create_sql => 'GRANT SELECT ON TABLE dump_test.test_table
+               create_sql   => 'GRANT SELECT ON TABLE dump_test.test_table
                                                   TO dump_test;',
                regexp => qr/^GRANT SELECT ON TABLE test_table TO dump_test;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
-               unlike => {
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       pg_dumpall_globals => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table_data => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       only_dump_test_table    => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
+               unlike => {
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       pg_dumpall_globals       => 1, }, },
        'GRANT SELECT ON TABLE test_third_table' => {
                create_order => 19,
-               create_sql => 'GRANT SELECT ON
+               create_sql   => 'GRANT SELECT ON
                                                   TABLE dump_test_second_schema.test_third_table
                                                   TO dump_test;',
                regexp => qr/^GRANT SELECT ON TABLE test_third_table TO dump_test;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               like   => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       pg_dumpall_globals     => 1,
+                       test_schema_plus_blobs => 1, }, },
        'GRANT ALL ON SEQUENCE test_third_table_col1_seq' => {
                create_order => 28,
-               create_sql => 'GRANT ALL ON SEQUENCE
+               create_sql   => 'GRANT ALL ON SEQUENCE
                                                   dump_test_second_schema.test_third_table_col1_seq
                                                   TO dump_test;',
                regexp => qr/^
                        \QGRANT ALL ON SEQUENCE test_third_table_col1_seq TO dump_test;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       pg_dumpall_globals     => 1,
+                       test_schema_plus_blobs => 1, }, },
        'GRANT INSERT(col1) ON TABLE test_second_table' => {
                create_order => 8,
-               create_sql => 'GRANT INSERT (col1) ON TABLE dump_test.test_second_table
+               create_sql =>
+                 'GRANT INSERT (col1) ON TABLE dump_test.test_second_table
                                                   TO dump_test;',
                regexp => qr/^
                        \QGRANT INSERT(col1) ON TABLE test_second_table TO dump_test;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       test_schema_plus_blobs => 1,
-               },
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       schema_only             => 1,
+                       section_pre_data        => 1,
+                       test_schema_plus_blobs  => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-               },
-       },
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1, }, },
        'GRANT EXECUTE ON FUNCTION pg_sleep() TO dump_test' => {
                create_order => 16,
-               create_sql => 'GRANT EXECUTE ON FUNCTION pg_sleep(float8)
+               create_sql   => 'GRANT EXECUTE ON FUNCTION pg_sleep(float8)
                                                   TO dump_test;',
                regexp => qr/^
                        \QGRANT ALL ON FUNCTION pg_sleep(double precision) TO dump_test;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'GRANT SELECT (proname ...) ON TABLE pg_proc TO public' => {
                create_order => 46,
-               create_sql => 'GRANT SELECT (
+               create_sql   => 'GRANT SELECT (
                                                   tableoid,
                                                   oid,
                                                   proname,
@@ -2639,58 +2233,50 @@ my %tests = (
                \QGRANT SELECT(proconfig) ON TABLE pg_proc TO PUBLIC;\E\n.*
                \QGRANT SELECT(proacl) ON TABLE pg_proc TO PUBLIC;\E/xms,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
-       'GRANT commands' => { # catch-all for GRANT commands
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
+       'GRANT commands' => {    # catch-all for GRANT commands
                regexp => qr/^GRANT /m,
-               like => { }, # use more-specific options above
+               like   => {},             # use more-specific options above
                unlike => {
                        column_inserts => 1,
-                       data_only => 1,
-                       no_privs => 1,
-                       section_data => 1,
-               },
-       },
+                       data_only      => 1,
+                       no_privs       => 1,
+                       section_data   => 1, }, },
        'REFRESH MATERIALIZED VIEW matview' => {
                regexp => qr/^REFRESH MATERIALIZED VIEW matview;/m,
-               like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       test_schema_plus_blobs => 1,
-                       section_post_data => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-       },
+               like   => {
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       test_schema_plus_blobs  => 1,
+                       section_post_data       => 1, },
+               unlike => {
+                       binary_upgrade           => 1,
+                       exclude_dump_test_schema => 1,
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, }, },
        'REFRESH MATERIALIZED VIEW matview_second' => {
                regexp => qr/^
                        \QREFRESH MATERIALIZED VIEW matview;\E
@@ -2698,136 +2284,118 @@ my %tests = (
                        \QREFRESH MATERIALIZED VIEW matview_second;\E
                        /xms,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_test_table => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
                        exclude_test_table_data => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       only_dump_test_schema => 1,
-                       test_schema_plus_blobs => 1,
-                       section_post_data => 1,
-               },
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       test_schema_plus_blobs  => 1,
+                       section_post_data       => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       pg_dumpall_globals => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-       },
+                       only_dump_test_table     => 1,
+                       pg_dumpall_globals       => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, }, },
        'REVOKE EXECUTE ON FUNCTION pg_sleep() FROM public' => {
                create_order => 15,
-               create_sql => 'REVOKE EXECUTE ON FUNCTION pg_sleep(float8)
+               create_sql   => 'REVOKE EXECUTE ON FUNCTION pg_sleep(float8)
                                                   FROM public;',
                regexp => qr/^
                        \QREVOKE ALL ON FUNCTION pg_sleep(double precision) FROM PUBLIC;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'REVOKE SELECT ON TABLE pg_proc FROM public' => {
                create_order => 45,
-               create_sql => 'REVOKE SELECT ON TABLE pg_proc FROM public;',
-               regexp => qr/^REVOKE SELECT ON TABLE pg_proc FROM PUBLIC;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+               create_sql   => 'REVOKE SELECT ON TABLE pg_proc FROM public;',
+               regexp       => qr/^REVOKE SELECT ON TABLE pg_proc FROM PUBLIC;/m,
+               like         => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'REVOKE CREATE ON SCHEMA public FROM public' => {
                create_order => 16,
-               create_sql => 'REVOKE CREATE ON SCHEMA public FROM public;',
-               regexp => qr/^
+               create_sql   => 'REVOKE CREATE ON SCHEMA public FROM public;',
+               regexp       => qr/^
                        \QREVOKE ALL ON SCHEMA public FROM PUBLIC;\E
                        \n\QGRANT USAGE ON SCHEMA public TO PUBLIC;\E
                        /xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
        'REVOKE USAGE ON LANGUAGE plpgsql FROM public' => {
                create_order => 16,
-               create_sql => 'REVOKE USAGE ON LANGUAGE plpgsql FROM public;',
-               regexp => qr/^REVOKE ALL ON LANGUAGE plpgsql FROM PUBLIC;/m,
-               like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
-               unlike => {
-                       only_dump_test_schema => 1,
-                       only_dump_test_table => 1,
-                       test_schema_plus_blobs => 1,
-               },
-       },
-       'REVOKE commands' => { # catch-all for REVOKE commands
+               create_sql   => 'REVOKE USAGE ON LANGUAGE plpgsql FROM public;',
+               regexp       => qr/^REVOKE ALL ON LANGUAGE plpgsql FROM PUBLIC;/m,
+               like         => {
+                       binary_upgrade           => 1,
+                       clean                    => 1,
+                       clean_if_exists          => 1,
+                       createdb                 => 1,
+                       defaults                 => 1,
+                       exclude_dump_test_schema => 1,
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       no_owner                 => 1,
+                       schema_only              => 1,
+                       section_pre_data         => 1, },
+               unlike => {
+                       only_dump_test_schema  => 1,
+                       only_dump_test_table   => 1,
+                       test_schema_plus_blobs => 1, }, },
+       'REVOKE commands' => {    # catch-all for REVOKE commands
                regexp => qr/^REVOKE /m,
-               like => { }, # use more-specific options above
+               like   => {},              # use more-specific options above
                unlike => {
-                       column_inserts => 1,
-                       data_only => 1,
-                       no_privs => 1,
-                       pg_dumpall_globals => 1,
-               },
-       },
-);
+                       column_inserts     => 1,
+                       data_only          => 1,
+                       no_privs           => 1,
+                       pg_dumpall_globals => 1, }, },);
 
 #########################################
 # Create a PG instance to test actually dumping from
@@ -2841,28 +2409,34 @@ my $port = $node->port;
 # Start with 2 because of command_exit_is() tests below
 my $num_tests = 2;
 
-foreach my $run (sort keys %pgdump_runs) {
+foreach my $run (sort keys %pgdump_runs)
+{
        my $test_key = $run;
 
        # Each run of pg_dump is a test itself
        $num_tests++;
 
        # If there is a restore cmd, that's another test
-       if ($pgdump_runs{$run}->{restore_cmd}) {
+       if ($pgdump_runs{$run}->{restore_cmd})
+       {
                $num_tests++;
        }
 
-       if ($pgdump_runs{$run}->{test_key}) {
+       if ($pgdump_runs{$run}->{test_key})
+       {
                $test_key = $pgdump_runs{$run}->{test_key};
        }
 
        # Then count all the tests run against each run
-       foreach my $test (sort keys %tests) {
-               if ($tests{$test}->{like}->{$test_key}) {
+       foreach my $test (sort keys %tests)
+       {
+               if ($tests{$test}->{like}->{$test_key})
+               {
                        $num_tests++;
                }
 
-               if ($tests{$test}->{unlike}->{$test_key}) {
+               if ($tests{$test}->{unlike}->{$test_key})
+               {
                        $num_tests++;
                }
        }
@@ -2877,17 +2451,26 @@ my $create_sql = '';
 
 foreach my $test (
        sort {
-               if ($tests{$a}->{create_order} and $tests{$b}->{create_order}) {
+               if ($tests{$a}->{create_order} and $tests{$b}->{create_order})
+               {
                        $tests{$a}->{create_order} <=> $tests{$b}->{create_order};
-               } elsif ($tests{$a}->{create_order}) {
+               }
+               elsif ($tests{$a}->{create_order})
+               {
                        -1;
-               } elsif ($tests{$b}->{create_order}) {
+               }
+               elsif ($tests{$b}->{create_order})
+               {
                        1;
-               } else {
+               }
+               else
+               {
                        0;
                }
-       } keys %tests) {
-       if ($tests{$test}->{create_sql}) {
+       } keys %tests)
+{
+       if ($tests{$test}->{create_sql})
+       {
                $create_sql .= $tests{$test}->{create_sql};
        }
 }
@@ -2898,26 +2481,35 @@ $node->safe_psql('postgres', $create_sql);
 #########################################
 # Test connecting to a non-existent database
 
-command_exit_is([ 'pg_dump', '-p', "$port", 'qqq' ],
-       1, 'pg_dump: [archiver (db)] connection to database "qqq" failed: FATAL:  database "qqq" does not exist');
+command_exit_is(
+       [ 'pg_dump', '-p', "$port", 'qqq' ],
+       1,
+'pg_dump: [archiver (db)] connection to database "qqq" failed: FATAL:  database "qqq" does not exist'
+);
 
 command_exit_is([ 'pg_dump', '-p', "$port", '--role=dump_test' ],
-       1, 'pg_dump: [archiver (db)] query failed: ERROR:  permission denied for');
+       1,
+       'pg_dump: [archiver (db)] query failed: ERROR:  permission denied for');
 
 #########################################
 # Run all runs
 
-foreach my $run (sort keys %pgdump_runs) {
+foreach my $run (sort keys %pgdump_runs)
+{
 
        my $test_key = $run;
 
-       $node->command_ok(\@{ $pgdump_runs{$run}->{dump_cmd} }, "$run: pg_dump runs");
+       $node->command_ok(\@{ $pgdump_runs{$run}->{dump_cmd} },
+               "$run: pg_dump runs");
 
-       if ($pgdump_runs{$run}->{restore_cmd}) {
-               $node->command_ok(\@{ $pgdump_runs{$run}->{restore_cmd} }, "$run: pg_restore runs");
+       if ($pgdump_runs{$run}->{restore_cmd})
+       {
+               $node->command_ok(\@{ $pgdump_runs{$run}->{restore_cmd} },
+                       "$run: pg_restore runs");
        }
 
-       if ($pgdump_runs{$run}->{test_key}) {
+       if ($pgdump_runs{$run}->{test_key})
+       {
                $test_key = $pgdump_runs{$run}->{test_key};
        }
 
@@ -2927,13 +2519,19 @@ foreach my $run (sort keys %pgdump_runs) {
        # Run all tests where this run is included
        # as either a 'like' or 'unlike' test.
 
-       foreach my $test (sort keys %tests) {
-               if ($tests{$test}->{like}->{$test_key}) {
+       foreach my $test (sort keys %tests)
+       {
+               if ($tests{$test}->{like}->{$test_key})
+               {
                        like($output_file, $tests{$test}->{regexp}, "$run: dumps $test");
                }
 
-               if ($tests{$test}->{unlike}->{$test_key}) {
-                       unlike($output_file, $tests{$test}->{regexp}, "$run: does not dump $test");
+               if ($tests{$test}->{unlike}->{$test_key})
+               {
+                       unlike(
+                               $output_file,
+                               $tests{$test}->{regexp},
+                               "$run: does not dump $test");
                }
        }
 }
index bda0516cb3fedfa4d5e681fcd87eb65149ea4d0f..135d8f0449f596cf86e8a43809356b78b0b2d4ea 100644 (file)
@@ -114,6 +114,7 @@ sub check_query
 
 sub setup_cluster
 {
+
        # Initialize master, data checksums are mandatory
        $node_master = get_new_node('master');
        $node_master->init(allows_streaming => 1);
index e21859198d269e1146dffa10c87d36e71b230035..cc17ea82185f0780c5d01253f8f83d10483ab95d 100644 (file)
@@ -632,8 +632,8 @@ sub preload_addons
        my $filename = $path . "/ecpg.addons";
        open(my $fh, '<', $filename) or die;
 
 # there may be multiple lines starting ECPG: and then multiple lines of code.
 # the code need to be add to all prior ECPG records.
+ # there may be multiple lines starting ECPG: and then multiple lines of code.
+ # the code need to be add to all prior ECPG records.
        my (@needsRules, @code, $record);
 
        # there may be comments before the first ECPG line, skip them
index f076a2739d4c71f975b281ef03345b89d08cf095..427092cfc5075abfc8cfcdd1ff1da346c63f4d18 100644 (file)
@@ -13,17 +13,21 @@ $node->append_conf('postgresql.conf', 'track_commit_timestamp = on');
 $node->start;
 
 # Create a table, compare "now()" to the commit TS of its xmin
-$node->safe_psql('postgres', 'create table t as select now from (select now(), pg_sleep(1)) f');
+$node->safe_psql('postgres',
+       'create table t as select now from (select now(), pg_sleep(1)) f');
 my $true = $node->safe_psql('postgres',
-       'select t.now - ts.* < \'1s\' from t, pg_class c, pg_xact_commit_timestamp(c.xmin) ts where relname = \'t\'');
+'select t.now - ts.* < \'1s\' from t, pg_class c, pg_xact_commit_timestamp(c.xmin) ts where relname = \'t\''
+);
 is($true, 't', 'commit TS is set');
 my $ts = $node->safe_psql('postgres',
-       'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'');
+'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\''
+);
 
 # Verify that we read the same TS after crash recovery
 $node->stop('immediate');
 $node->start;
 
 my $recovered_ts = $node->safe_psql('postgres',
-       'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'');
+'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\''
+);
 is($recovered_ts, $ts, 'commit TS remains after crash recovery');
index 9410c9c3d25c304ef71621e6f9f4e1c1be604f57..4dbde2978e4944edf5ec57cb97c4853745faa23a 100644 (file)
@@ -8,10 +8,11 @@ use Test::More tests => 4;
 use PostgresNode;
 
 my $bkplabel = 'backup';
-my $master = get_new_node('master');
+my $master   = get_new_node('master');
 $master->init(allows_streaming => 1);
 
-$master->append_conf('postgresql.conf', qq{
+$master->append_conf(
+       'postgresql.conf', qq{
        track_commit_timestamp = on
        max_wal_senders = 5
        wal_level = hot_standby
@@ -28,30 +29,37 @@ for my $i (1 .. 10)
        $master->safe_psql('postgres', "create table t$i()");
 }
 my $master_ts = $master->safe_psql('postgres',
-       qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'});
-my $master_lsn = $master->safe_psql('postgres',
-       'select pg_current_xlog_location()');
+qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
+);
+my $master_lsn =
+  $master->safe_psql('postgres', 'select pg_current_xlog_location()');
 $standby->poll_query_until('postgres',
        qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
-       or die "slave never caught up";
+  or die "slave never caught up";
 
 my $standby_ts = $standby->safe_psql('postgres',
-       qq{select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = 't10'});
+qq{select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = 't10'}
+);
 is($master_ts, $standby_ts, "standby gives same value as master");
 
 $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
 $master->restart;
 $master->safe_psql('postgres', 'checkpoint');
-$master_lsn = $master->safe_psql('postgres',
-       'select pg_current_xlog_location()');
+$master_lsn =
+  $master->safe_psql('postgres', 'select pg_current_xlog_location()');
 $standby->poll_query_until('postgres',
        qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
-       or die "slave never caught up";
+  or die "slave never caught up";
 $standby->safe_psql('postgres', 'checkpoint');
 
 # This one should raise an error now
 my ($ret, $standby_ts_stdout, $standby_ts_stderr) = $standby->psql('postgres',
-       'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t10\'');
+'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t10\''
+);
 is($ret, 3, 'standby errors when master turned feature off');
-is($standby_ts_stdout, '', "standby gives no value when master turned feature off");
-like($standby_ts_stderr, qr/could not get commit timestamp data/, 'expected error when master turned feature off');
+is($standby_ts_stdout, '',
+       "standby gives no value when master turned feature off");
+like(
+       $standby_ts_stderr,
+       qr/could not get commit timestamp data/,
+       'expected error when master turned feature off');
index 138cc43dc2b34e0fd166f55b1b79e86145fba460..d37ff182c4cb27501a0c7360de00ce7ffd2c6fa6 100644 (file)
@@ -8,9 +8,10 @@ use Test::More tests => 4;
 use PostgresNode;
 
 my $bkplabel = 'backup';
-my $master = get_new_node('master');
+my $master   = get_new_node('master');
 $master->init(allows_streaming => 1);
-$master->append_conf('postgresql.conf', qq{
+$master->append_conf(
+       'postgresql.conf', qq{
        track_commit_timestamp = on
        max_wal_senders = 5
        wal_level = hot_standby
@@ -29,20 +30,25 @@ for my $i (1 .. 10)
 $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
 $master->restart;
 $master->safe_psql('postgres', 'checkpoint');
-my $master_lsn = $master->safe_psql('postgres',
-       'select pg_current_xlog_location()');
+my $master_lsn =
+  $master->safe_psql('postgres', 'select pg_current_xlog_location()');
 $standby->poll_query_until('postgres',
        qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
-       or die "slave never caught up";
+  or die "slave never caught up";
 
 $standby->safe_psql('postgres', 'checkpoint');
 $standby->restart;
 
-my ($psql_ret, $standby_ts_stdout, $standby_ts_stderr) = $standby->psql('postgres',
-       qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'});
+my ($psql_ret, $standby_ts_stdout, $standby_ts_stderr) = $standby->psql(
+       'postgres',
+qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
+);
 is($psql_ret, 3, 'expect error when getting commit timestamp after restart');
 is($standby_ts_stdout, '', "standby does not return a value after restart");
-like($standby_ts_stderr, qr/could not get commit timestamp data/, 'expected err msg after restart');
+like(
+       $standby_ts_stderr,
+       qr/could not get commit timestamp data/,
+       'expected err msg after restart');
 
 $master->append_conf('postgresql.conf', 'track_commit_timestamp = on');
 $master->restart;
@@ -54,5 +60,7 @@ $standby->poll_query_until('postgres', "SELECT pg_is_in_recovery() <> true");
 
 $standby->safe_psql('postgres', "create table t11()");
 my $standby_ts = $standby->safe_psql('postgres',
-       qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't11'});
-isnt($standby_ts, '', "standby gives valid value ($standby_ts) after promotion");
+qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't11'}
+);
+isnt($standby_ts, '',
+       "standby gives valid value ($standby_ts) after promotion");
index 626eb4b758f5d2ab68375ec75ef6e06da0e2a1ba..fd00e4bd3211e78c9dea9da5bac58d0d5a2a85be 100644 (file)
@@ -45,175 +45,110 @@ my %pgdump_runs = (
                        '-f', "$tempdir/binary_upgrade.sql",
                        '--schema-only',
                        '--binary-upgrade',
-                       '-d', 'postgres', # alternative way to specify database
-               ],
-       },
+                       '-d', 'postgres',    # alternative way to specify database
+               ], },
        clean => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/clean.sql",
                        '-c',
-                       '-d', 'postgres', # alternative way to specify database
-               ],
-       },
+                       '-d', 'postgres',    # alternative way to specify database
+               ], },
        clean_if_exists => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/clean_if_exists.sql",
                        '-c',
                        '--if-exists',
-                       '-E', 'UTF8', # no-op, just tests that option is accepted
-                       'postgres',
-               ],
-       },
+                       '-E', 'UTF8',        # no-op, just tests that option is accepted
+                       'postgres', ], },
        column_inserts => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/column_inserts.sql",
-                       '-a',
-                       '--column-inserts',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                     '-f',
+                       "$tempdir/column_inserts.sql", '-a',
+                       '--column-inserts',            'postgres', ], },
        createdb => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/createdb.sql",
                        '-C',
-                       '-R', # no-op, just for testing
-                       'postgres',
-               ],
-       },
+                       '-R',                # no-op, just for testing
+                       'postgres', ], },
        data_only => {
                dump_cmd => [
                        'pg_dump',
                        '-f', "$tempdir/data_only.sql",
                        '-a',
-                       '-v', # no-op, just make sure it works
-                       'postgres',
-               ],
-       },
+                       '-v',                # no-op, just make sure it works
+                       'postgres', ], },
        defaults => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/defaults.sql",
-                       'postgres',
-               ],
+               dump_cmd => [ 'pg_dump', '-f', "$tempdir/defaults.sql", 'postgres', ],
        },
        defaults_custom_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fc',
-                       '-Z6',
-                       '-f', "$tempdir/defaults_custom_format.dump",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fc', '-Z6', '-f',
+                       "$tempdir/defaults_custom_format.dump", 'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_custom_format.sql",
-                       "$tempdir/defaults_custom_format.dump",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_custom_format.sql",
+                       "$tempdir/defaults_custom_format.dump", ], },
        defaults_dir_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fd',
-                       '-f', "$tempdir/defaults_dir_format",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fd', '-f', "$tempdir/defaults_dir_format",
+                       'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_dir_format.sql",
-                       "$tempdir/defaults_dir_format",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_dir_format.sql",
+                       "$tempdir/defaults_dir_format", ], },
        defaults_parallel => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Fd',
-                       '-j2',
-                       '-f', "$tempdir/defaults_parallel",
-                       'postgres',
-               ],
+                       'pg_dump', '-Fd', '-j2', '-f', "$tempdir/defaults_parallel",
+                       'postgres', ],
                restore_cmd => [
-                       'pg_restore',
-                       '-f', "$tempdir/defaults_parallel.sql",
-                       "$tempdir/defaults_parallel",
-               ],
+                       'pg_restore',                     '-f',
+                       "$tempdir/defaults_parallel.sql", "$tempdir/defaults_parallel", ],
        },
        defaults_tar_format => {
                test_key => 'defaults',
                dump_cmd => [
-                       'pg_dump',
-                       '-Ft',
-                       '-f', "$tempdir/defaults_tar_format.tar",
-                       'postgres',
-               ],
+                       'pg_dump', '-Ft', '-f', "$tempdir/defaults_tar_format.tar",
+                       'postgres', ],
                restore_cmd => [
                        'pg_restore',
-                       '-f', "$tempdir/defaults_tar_format.sql",
-                       "$tempdir/defaults_tar_format.tar",
-               ],
-       },
+                       '-f',
+                       "$tempdir/defaults_tar_format.sql",
+                       "$tempdir/defaults_tar_format.tar", ], },
        pg_dumpall_globals => {
-               dump_cmd => [
-                       'pg_dumpall',
-                       '-f', "$tempdir/pg_dumpall_globals.sql",
-                       '-g',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dumpall', '-f', "$tempdir/pg_dumpall_globals.sql", '-g', ], },
        no_privs => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/no_privs.sql",
-                       '-x',
-                       'postgres',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/no_privs.sql", '-x', 'postgres', ], },
        no_owner => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/no_owner.sql",
-                       '-O',
-                       'postgres',
-               ],
-       },
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/no_owner.sql", '-O', 'postgres', ], },
        schema_only => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/schema_only.sql",
-                       '-s',
-                       'postgres',
-               ],
+               dump_cmd =>
+                 [ 'pg_dump', '-f', "$tempdir/schema_only.sql", '-s', 'postgres', ],
        },
        section_pre_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_pre_data.sql",
-                       '--section=pre-data',
-                       'postgres',
-               ],
-       },
+                       'pg_dump', '-f', "$tempdir/section_pre_data.sql",
+                       '--section=pre-data', 'postgres', ], },
        section_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_data.sql",
-                       '--section=data',
-                       'postgres',
-               ],
-       },
+                       'pg_dump',                   '-f',
+                       "$tempdir/section_data.sql", '--section=data',
+                       'postgres', ], },
        section_post_data => {
                dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/section_post_data.sql",
-                       '--section=post-data',
-                       'postgres',
-               ],
-       },
-);
+                       'pg_dump', '-f', "$tempdir/section_post_data.sql",
+                       '--section=post-data', 'postgres', ], },);
 
 ###############################################################
 # Definition of the tests to run.
@@ -255,200 +190,167 @@ my %pgdump_runs = (
 my %tests = (
        'CREATE EXTENSION test_pg_dump' => {
                create_order => 2,
-               create_sql => 'CREATE EXTENSION test_pg_dump;',
-               regexp => qr/^
+               create_sql   => 'CREATE EXTENSION test_pg_dump;',
+               regexp       => qr/^
                        \QCREATE EXTENSION IF NOT EXISTS test_pg_dump WITH SCHEMA public;\E
                        $/xm,
                like => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       clean            => 1,
+                       clean_if_exists  => 1,
+                       createdb         => 1,
+                       defaults         => 1,
+                       no_privs         => 1,
+                       no_owner         => 1,
+                       schema_only      => 1,
+                       section_pre_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade     => 1,
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data  => 1, }, },
        'CREATE ROLE dump_test' => {
                create_order => 1,
-               create_sql => 'CREATE ROLE dump_test;',
-               regexp => qr/^CREATE ROLE dump_test;$/m,
-               like => {
-                       pg_dumpall_globals => 1,
-               },
-               unlike => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-               },
-       },
+               create_sql   => 'CREATE ROLE dump_test;',
+               regexp       => qr/^CREATE ROLE dump_test;$/m,
+               like         => { pg_dumpall_globals => 1, },
+               unlike       => {
+                       binary_upgrade    => 1,
+                       clean             => 1,
+                       clean_if_exists   => 1,
+                       createdb          => 1,
+                       defaults          => 1,
+                       no_privs          => 1,
+                       no_owner          => 1,
+                       schema_only       => 1,
+                       section_pre_data  => 1,
+                       section_post_data => 1, }, },
        'CREATE TABLE regress_pg_dump_table' => {
                regexp => qr/^
                        \QCREATE TABLE regress_pg_dump_table (\E
                        \n\s+\Qcol1 integer,\E
                        \n\s+\Qcol2 integer\E
                        \n\);$/xm,
-               like => {
-                       binary_upgrade => 1,
-               },
+               like   => { binary_upgrade => 1, },
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
+                       clean              => 1,
+                       clean_if_exists    => 1,
+                       createdb           => 1,
+                       defaults           => 1,
+                       no_privs           => 1,
+                       no_owner           => 1,
                        pg_dumpall_globals => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-               },
-       },
+                       schema_only        => 1,
+                       section_pre_data   => 1,
+                       section_post_data  => 1, }, },
        'CREATE ACCESS METHOD regress_test_am' => {
                regexp => qr/^
                        \QCREATE ACCESS METHOD regress_test_am TYPE INDEX HANDLER bthandler;\E
                        $/xm,
-               like => {
-                       binary_upgrade => 1,
-               },
+               like   => { binary_upgrade => 1, },
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
+                       clean              => 1,
+                       clean_if_exists    => 1,
+                       createdb           => 1,
+                       defaults           => 1,
+                       no_privs           => 1,
+                       no_owner           => 1,
                        pg_dumpall_globals => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       section_post_data => 1,
-               },
-       },
+                       schema_only        => 1,
+                       section_pre_data   => 1,
+                       section_post_data  => 1, }, },
        'COMMENT ON EXTENSION test_pg_dump' => {
                regexp => qr/^
                        \QCOMMENT ON EXTENSION test_pg_dump \E
                        \QIS 'Test pg_dump with an extension';\E
                        $/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_privs => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       binary_upgrade   => 1,
+                       clean            => 1,
+                       clean_if_exists  => 1,
+                       createdb         => 1,
+                       defaults         => 1,
+                       no_privs         => 1,
+                       no_owner         => 1,
+                       schema_only      => 1,
+                       section_pre_data => 1, },
                unlike => {
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data  => 1, }, },
        'GRANT SELECT ON TABLE regress_pg_dump_table' => {
                regexp => qr/^
                        \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n
                        \QGRANT SELECT ON TABLE regress_pg_dump_table TO dump_test;\E\n
                        \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E
                        $/xms,
-               like => {
-                       binary_upgrade => 1,
-               },
+               like   => { binary_upgrade => 1, },
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       no_privs => 1,
+                       clean              => 1,
+                       clean_if_exists    => 1,
+                       createdb           => 1,
+                       defaults           => 1,
+                       no_owner           => 1,
+                       schema_only        => 1,
+                       section_pre_data   => 1,
+                       no_privs           => 1,
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data  => 1, }, },
        'GRANT SELECT(col1) ON regress_pg_dump_table' => {
                regexp => qr/^
                        \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n
                        \QGRANT SELECT(col1) ON TABLE regress_pg_dump_table TO PUBLIC;\E\n
                        \QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E
                        $/xms,
-               like => {
-                       binary_upgrade => 1,
-               },
+               like   => { binary_upgrade => 1, },
                unlike => {
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-                       no_privs => 1,
+                       clean              => 1,
+                       clean_if_exists    => 1,
+                       createdb           => 1,
+                       defaults           => 1,
+                       no_owner           => 1,
+                       schema_only        => 1,
+                       section_pre_data   => 1,
+                       no_privs           => 1,
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data  => 1, }, },
        'GRANT SELECT(col2) ON regress_pg_dump_table TO dump_test' => {
                create_order => 4,
-               create_sql => 'GRANT SELECT(col2) ON regress_pg_dump_table
+               create_sql   => 'GRANT SELECT(col2) ON regress_pg_dump_table
                                                   TO dump_test;',
                regexp => qr/^
                        \QGRANT SELECT(col2) ON TABLE regress_pg_dump_table TO dump_test;\E
                        $/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       binary_upgrade   => 1,
+                       clean            => 1,
+                       clean_if_exists  => 1,
+                       createdb         => 1,
+                       defaults         => 1,
+                       no_owner         => 1,
+                       schema_only      => 1,
+                       section_pre_data => 1, },
                unlike => {
-                       no_privs => 1,
+                       no_privs           => 1,
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
+                       section_post_data  => 1, }, },
        'REVOKE SELECT(col1) ON regress_pg_dump_table' => {
                create_order => 3,
-               create_sql => 'REVOKE SELECT(col1) ON regress_pg_dump_table
+               create_sql   => 'REVOKE SELECT(col1) ON regress_pg_dump_table
                                                   FROM PUBLIC;',
                regexp => qr/^
                        \QREVOKE SELECT(col1) ON TABLE regress_pg_dump_table FROM PUBLIC;\E
                        $/xm,
                like => {
-                       binary_upgrade => 1,
-                       clean => 1,
-                       clean_if_exists => 1,
-                       createdb => 1,
-                       defaults => 1,
-                       no_owner => 1,
-                       schema_only => 1,
-                       section_pre_data => 1,
-               },
+                       binary_upgrade   => 1,
+                       clean            => 1,
+                       clean_if_exists  => 1,
+                       createdb         => 1,
+                       defaults         => 1,
+                       no_owner         => 1,
+                       schema_only      => 1,
+                       section_pre_data => 1, },
                unlike => {
-                       no_privs => 1,
+                       no_privs           => 1,
                        pg_dumpall_globals => 1,
-                       section_post_data => 1,
-               },
-       },
-);
+                       section_post_data  => 1, }, },);
 
 #########################################
 # Create a PG instance to test actually dumping from
@@ -461,28 +363,34 @@ my $port = $node->port;
 
 my $num_tests = 0;
 
-foreach my $run (sort keys %pgdump_runs) {
+foreach my $run (sort keys %pgdump_runs)
+{
        my $test_key = $run;
 
        # Each run of pg_dump is a test itself
        $num_tests++;
 
        # If there is a restore cmd, that's another test
-       if ($pgdump_runs{$run}->{restore_cmd}) {
+       if ($pgdump_runs{$run}->{restore_cmd})
+       {
                $num_tests++;
        }
 
-       if ($pgdump_runs{$run}->{test_key}) {
+       if ($pgdump_runs{$run}->{test_key})
+       {
                $test_key = $pgdump_runs{$run}->{test_key};
        }
 
        # Then count all the tests run against each run
-       foreach my $test (sort keys %tests) {
-               if ($tests{$test}->{like}->{$test_key}) {
+       foreach my $test (sort keys %tests)
+       {
+               if ($tests{$test}->{like}->{$test_key})
+               {
                        $num_tests++;
                }
 
-               if ($tests{$test}->{unlike}->{$test_key}) {
+               if ($tests{$test}->{unlike}->{$test_key})
+               {
                        $num_tests++;
                }
        }
@@ -497,17 +405,26 @@ my $create_sql = '';
 
 foreach my $test (
        sort {
-               if ($tests{$a}->{create_order} and $tests{$b}->{create_order}) {
+               if ($tests{$a}->{create_order} and $tests{$b}->{create_order})
+               {
                        $tests{$a}->{create_order} <=> $tests{$b}->{create_order};
-               } elsif ($tests{$a}->{create_order}) {
+               }
+               elsif ($tests{$a}->{create_order})
+               {
                        -1;
-               } elsif ($tests{$b}->{create_order}) {
+               }
+               elsif ($tests{$b}->{create_order})
+               {
                        1;
-               } else {
+               }
+               else
+               {
                        0;
                }
-       } keys %tests) {
-       if ($tests{$test}->{create_sql}) {
+       } keys %tests)
+{
+       if ($tests{$test}->{create_sql})
+       {
                $create_sql .= $tests{$test}->{create_sql};
        }
 }
@@ -518,17 +435,22 @@ $node->safe_psql('postgres', $create_sql);
 #########################################
 # Run all runs
 
-foreach my $run (sort keys %pgdump_runs) {
+foreach my $run (sort keys %pgdump_runs)
+{
 
        my $test_key = $run;
 
-       $node->command_ok(\@{ $pgdump_runs{$run}->{dump_cmd} }, "$run: pg_dump runs");
+       $node->command_ok(\@{ $pgdump_runs{$run}->{dump_cmd} },
+               "$run: pg_dump runs");
 
-       if ($pgdump_runs{$run}->{restore_cmd}) {
-               $node->command_ok(\@{ $pgdump_runs{$run}->{restore_cmd} }, "$run: pg_restore runs");
+       if ($pgdump_runs{$run}->{restore_cmd})
+       {
+               $node->command_ok(\@{ $pgdump_runs{$run}->{restore_cmd} },
+                       "$run: pg_restore runs");
        }
 
-       if ($pgdump_runs{$run}->{test_key}) {
+       if ($pgdump_runs{$run}->{test_key})
+       {
                $test_key = $pgdump_runs{$run}->{test_key};
        }
 
@@ -538,13 +460,19 @@ foreach my $run (sort keys %pgdump_runs) {
        # Run all tests where this run is included
        # as either a 'like' or 'unlike' test.
 
-       foreach my $test (sort keys %tests) {
-               if ($tests{$test}->{like}->{$test_key}) {
+       foreach my $test (sort keys %tests)
+       {
+               if ($tests{$test}->{like}->{$test_key})
+               {
                        like($output_file, $tests{$test}->{regexp}, "$run: dumps $test");
                }
 
-               if ($tests{$test}->{unlike}->{$test_key}) {
-                       unlike($output_file, $tests{$test}->{regexp}, "$run: does not dump $test");
+               if ($tests{$test}->{unlike}->{$test_key})
+               {
+                       unlike(
+                               $output_file,
+                               $tests{$test}->{regexp},
+                               "$run: does not dump $test");
                }
        }
 }
index 4e66006af3b8444c0268dd999dc30641f9383071..636dfec5c06cedb4b4e014ad8cb2cb5cf644c07d 100644 (file)
@@ -103,6 +103,7 @@ our ($test_localhost, $test_pghost, $last_port_assigned, @all_nodes);
 
 INIT
 {
+
        # PGHOST is set once and for all through a single series of tests when
        # this module is loaded.
        $test_localhost = "127.0.0.1";
@@ -540,11 +541,12 @@ sub _backup_fs
 
        if ($hot)
        {
+
                # We ignore pg_stop_backup's return value. We also assume archiving
                # is enabled; otherwise the caller will have to copy the remaining
                # segments.
-               my $stdout = $self->safe_psql('postgres',
-                       'SELECT * FROM pg_stop_backup();');
+               my $stdout =
+                 $self->safe_psql('postgres', 'SELECT * FROM pg_stop_backup();');
                print "# pg_stop_backup: $stdout\n";
        }
 
@@ -842,6 +844,7 @@ sub get_new_node
 
        while ($found == 0)
        {
+
                # advance $port, wrapping correctly around range end
                $port = 49152 if ++$port >= 65536;
                print "# Checking port $port\n";
@@ -896,6 +899,7 @@ sub get_new_node
 # order, later when the File::Temp objects are destroyed.
 END
 {
+
        # take care not to change the script's exit value
        my $exit_code = $?;
 
@@ -1078,7 +1082,7 @@ sub psql
          IPC::Run::timeout($params{timeout}, exception => $timeout_exception)
          if (defined($params{timeout}));
 
-       ${$params{timed_out}} = 0 if defined $params{timed_out};
+       ${ $params{timed_out} } = 0 if defined $params{timed_out};
 
        # IPC::Run would otherwise append to existing contents:
        $$stdout = "" if ref($stdout);
@@ -1107,6 +1111,7 @@ sub psql
                my $exc_save = $@;
                if ($exc_save)
                {
+
                        # IPC::Run::run threw an exception. re-throw unless it's a
                        # timeout, which we'll handle by testing is_expired
                        die $exc_save
index c4da1bbd837b1b3b802cdebac618c7ba3b7a3acc..3e9881328680fa2b08240e6325e5b7a826a7ecf8 100644 (file)
@@ -65,7 +65,7 @@ sub copypath
        {
                die "if specified, filterfn must be a subroutine reference"
                  unless defined(ref $params{filterfn})
-                 and (ref $params{filterfn} eq 'CODE');
+                         and (ref $params{filterfn} eq 'CODE');
 
                $filterfn = $params{filterfn};
        }
@@ -93,7 +93,8 @@ sub _copypath_recurse
 
        # Can't handle symlinks or other weird things
        die "Source path \"$srcpath\" is not a regular file or directory"
-         unless -f $srcpath or -d $srcpath;
+         unless -f $srcpath
+                 or -d $srcpath;
 
        # Abort if destination path already exists.  Should we allow directories
        # to exist already?
index 0057f6dfe9f3d55f577f4e635aaafc41b01b0293..649fd821733f13a7e8d450a89d545b4d09047759 100644 (file)
@@ -109,6 +109,7 @@ INIT
 
 END
 {
+
        # Preserve temporary directory for this test on failure
        $File::Temp::KEEP_ALL = 1 unless all_tests_passing();
 }
index 06c3c1f4cdab35a267ce8861b110323dff27b6cb..7b42f215344c7f9d20934cfd447ce5577dd2cbff 100644 (file)
@@ -51,10 +51,13 @@ my $result =
 print "standby 1: $result\n";
 is($result, qq(1002), 'check streamed content on standby 1');
 
-$result = $node_standby_2->safe_psql('postgres', "SELECT count(*) FROM tab_int");
+$result =
+  $node_standby_2->safe_psql('postgres', "SELECT count(*) FROM tab_int");
 print "standby 2: $result\n";
 is($result, qq(1002), 'check streamed content on standby 2');
 
 # Check that only READ-only queries can run on standbys
-is($node_standby_1->psql('postgres', 'INSERT INTO tab_int VALUES (1)'), 3, 'Read-only queries on standby 1');
-is($node_standby_2->psql('postgres', 'INSERT INTO tab_int VALUES (1)'), 3, 'Read-only queries on standby 2');
+is($node_standby_1->psql('postgres', 'INSERT INTO tab_int VALUES (1)'),
+       3, 'Read-only queries on standby 1');
+is($node_standby_2->psql('postgres', 'INSERT INTO tab_int VALUES (1)'),
+       3, 'Read-only queries on standby 2');
index b0b25380d2d96971bb57b0514cf6f117e01ca3e5..fc2bf7ee1d6c0ac2679df357261718f6d432d483 100644 (file)
@@ -48,5 +48,6 @@ my $caughtup_query =
 $node_standby->poll_query_until('postgres', $caughtup_query)
   or die "Timed out while waiting for standby to catch up";
 
-my $result = $node_standby->safe_psql('postgres', "SELECT count(*) FROM tab_int");
+my $result =
+  $node_standby->safe_psql('postgres', "SELECT count(*) FROM tab_int");
 is($result, qq(1000), 'check content from archives');
index b20116ac8cc4d56e514d4667ad0dad88dfa56a20..20b878e524a5462d41eab688806106368d97b00a 100644 (file)
@@ -66,7 +66,8 @@ $node_master->backup('my_backup');
 # target TXID.
 $node_master->safe_psql('postgres',
        "INSERT INTO tab_int VALUES (generate_series(1001,2000))");
-my $recovery_txid = $node_master->safe_psql('postgres', "SELECT txid_current()");
+my $recovery_txid =
+  $node_master->safe_psql('postgres', "SELECT txid_current()");
 my $lsn2 =
   $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
 
index 6af06c7e594c5ddfb3b63ddfd46b79de4cd747d6..3ee8df2cdc24885b1b2e4f86a54004c6d03e0836 100644 (file)
@@ -63,8 +63,8 @@ $node_standby_1->poll_query_until('postgres',
        "SELECT pg_is_in_recovery() <> true");
 $node_standby_1->safe_psql('postgres',
        "INSERT INTO tab_int VALUES (generate_series(1001,2000))");
-$until_lsn =
-  $node_standby_1->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+$until_lsn = $node_standby_1->safe_psql('postgres',
+       "SELECT pg_current_xlog_location();");
 $caughtup_query =
   "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
 $node_standby_2->poll_query_until('postgres', $caughtup_query)
index e38ab9dfd2f31046fc577ef2693c462e7186d887..cfd89292423948676f2fba6d0b2188d9d3616f40 100644 (file)
@@ -21,7 +21,7 @@ $node_master->backup($backup_name);
 
 # Create streaming standby from backup
 my $node_standby = get_new_node('standby');
-my $delay = 3;
+my $delay        = 3;
 $node_standby->init_from_backup($node_master, $backup_name,
        has_streaming => 1);
 $node_standby->append_conf(
@@ -47,10 +47,11 @@ my $until_lsn =
 my $remaining = 90;
 while ($remaining-- > 0)
 {
+
        # Done waiting?
-       my $replay_status =
-         $node_standby->safe_psql('postgres',
-               "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0");
+       my $replay_status = $node_standby->safe_psql('postgres',
+               "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+       );
        last if $replay_status eq 't';
 
        # No, sleep some more.
@@ -59,9 +60,10 @@ while ($remaining-- > 0)
        sleep $sleep;
 }
 
-die "Maximum number of attempts reached ($remaining remain)" if $remaining < 0;
+die "Maximum number of attempts reached ($remaining remain)"
+  if $remaining < 0;
 
 # This test is successful if and only if the LSN has been applied with at least
 # the configured apply delay.
 ok(time() - $master_insert_time >= $delay,
-   "Check that standby applies WAL only after replication delay");
+       "Check that standby applies WAL only after replication delay");
index d551954bcbb75517543be6aa1ece9c8800105b30..baf4477e3c609e7ede48f7813f5c52ebf4625607 100644 (file)
@@ -6,7 +6,8 @@ use TestLib;
 use Test::More tests => 8;
 
 # Query checking sync_priority and sync_state of each standby
-my $check_sql = "SELECT application_name, sync_priority, sync_state FROM pg_stat_replication ORDER BY application_name;";
+my $check_sql =
+"SELECT application_name, sync_priority, sync_state FROM pg_stat_replication ORDER BY application_name;";
 
 # Check that sync_state of each standby is expected.
 # If $setting is given, synchronous_standby_names is set to it and
@@ -18,12 +19,12 @@ sub test_sync_state
        if (defined($setting))
        {
                $self->psql('postgres',
-                                       "ALTER SYSTEM SET synchronous_standby_names = '$setting';");
+                       "ALTER SYSTEM SET synchronous_standby_names = '$setting';");
                $self->reload;
        }
 
        my $timeout_max = 30;
-       my $timeout = 0;
+       my $timeout     = 0;
        my $result;
 
        # A reload may take some time to take effect on busy machines,
@@ -71,7 +72,8 @@ $node_standby_3->start;
 
 # Check that sync_state is determined correctly when
 # synchronous_standby_names is specified in old syntax.
-test_sync_state($node_master, qq(standby1|1|sync
+test_sync_state(
+       $node_master, qq(standby1|1|sync
 standby2|2|potential
 standby3|0|async),
        'old syntax of synchronous_standby_names',
@@ -82,7 +84,8 @@ standby3|0|async),
 # Note that standby1 is chosen as sync standby because
 # it's stored in the head of WalSnd array which manages
 # all the standbys though they have the same priority.
-test_sync_state($node_master, qq(standby1|1|sync
+test_sync_state(
+       $node_master, qq(standby1|1|sync
 standby2|1|potential
 standby3|1|potential),
        'asterisk in synchronous_standby_names',
@@ -100,7 +103,8 @@ $node_standby_3->start;
 
 # Specify 2 as the number of sync standbys.
 # Check that two standbys are in 'sync' state.
-test_sync_state($node_master, qq(standby2|2|sync
+test_sync_state(
+       $node_master, qq(standby2|2|sync
 standby3|3|sync),
        '2 synchronous standbys',
        '2(standby1,standby2,standby3)');
@@ -111,14 +115,15 @@ $node_standby_1->start;
 # Create standby4 linking to master
 my $node_standby_4 = get_new_node('standby4');
 $node_standby_4->init_from_backup($node_master, $backup_name,
-                                                                 has_streaming => 1);
+       has_streaming => 1);
 $node_standby_4->start;
 
 # Check that standby1 and standby2 whose names appear earlier in
 # synchronous_standby_names are considered as sync. Also check that
 # standby3 appearing later represents potential, and standby4 is
 # in 'async' state because it's not in the list.
-test_sync_state($node_master, qq(standby1|1|sync
+test_sync_state(
+       $node_master, qq(standby1|1|sync
 standby2|2|sync
 standby3|3|potential
 standby4|0|async),
@@ -127,7 +132,8 @@ standby4|0|async),
 # Check that sync_state of each standby is determined correctly
 # when num_sync exceeds the number of names of potential sync standbys
 # specified in synchronous_standby_names.
-test_sync_state($node_master, qq(standby1|0|async
+test_sync_state(
+       $node_master, qq(standby1|0|async
 standby2|4|sync
 standby3|3|sync
 standby4|1|sync),
@@ -138,7 +144,8 @@ standby4|1|sync),
 # but does not make sense in most cases. Check that sync_state is
 # chosen properly even in case of that setting.
 # The priority of standby2 should be 2 because it matches * first.
-test_sync_state($node_master, qq(standby1|1|sync
+test_sync_state(
+       $node_master, qq(standby1|1|sync
 standby2|2|sync
 standby3|2|potential
 standby4|2|potential),
@@ -147,7 +154,8 @@ standby4|2|potential),
 
 # Check that the setting of '2(*)' chooses standby2 and standby3 that are stored
 # earlier in WalSnd array as sync standbys.
-test_sync_state($node_master, qq(standby1|1|potential
+test_sync_state(
+       $node_master, qq(standby1|1|potential
 standby2|1|sync
 standby3|1|sync
 standby4|1|potential),
@@ -159,7 +167,8 @@ $node_standby_3->stop;
 
 # Check that the state of standby1 stored earlier in WalSnd array than
 # standby4 is transited from potential to sync.
-test_sync_state($node_master, qq(standby1|1|sync
+test_sync_state(
+       $node_master, qq(standby1|1|sync
 standby2|1|sync
 standby4|1|potential),
        'potential standby found earlier in array is promoted to sync');
index 07d260b0b1b45025f7a91b31cb21a5cf9510dda3..aab162ed7531033075815cfe7d81595cfc540fd2 100755 (executable)
@@ -16,8 +16,8 @@ use File::Find;
 use File::Basename;
 use Tie::File;
 
-my $pgdg = 'PostgreSQL Global Development Group';
-my $cc   = 'Copyright \(c\)';
+my $pgdg      = 'PostgreSQL Global Development Group';
+my $cc        = 'Copyright \(c\)';
 my $ccliteral = 'Copyright (c)';
 
 # year-1900 is what localtime(time) puts in element 5
index 8d770162275e7c06788fbceb5e8b8c54ab8ef222..c9a503f3fe063fff2140eab3055222c9d5701151 100755 (executable)
@@ -66,24 +66,24 @@ my @BRANCHES = qw(master
 # Might want to make this parameter user-settable.
 my $timestamp_slop = 24 * 60 * 60;
 
-my $brief         = 0;
-my $details_after = 0;
-my $post_date     = 0;
-my $master_only   = 0;
+my $brief           = 0;
+my $details_after   = 0;
+my $post_date       = 0;
+my $master_only     = 0;
 my $non_master_only = 0;
-my $oldest_first  = 0;
+my $oldest_first    = 0;
 my $since;
 my @output_buffer;
 my $output_line = '';
 
 Getopt::Long::GetOptions(
-       'brief'         => \$brief,
-       'details-after' => \$details_after,
-       'master-only'   => \$master_only,
+       'brief'           => \$brief,
+       'details-after'   => \$details_after,
+       'master-only'     => \$master_only,
        'non-master-only' => \$non_master_only,
-       'post-date'     => \$post_date,
-       'oldest-first'  => \$oldest_first,
-       'since=s'       => \$since) || usage();
+       'post-date'       => \$post_date,
+       'oldest-first'    => \$oldest_first,
+       'since=s'         => \$since) || usage();
 usage() if @ARGV;
 
 my @git = qw(git log --format=fuller --date=iso);
@@ -250,7 +250,7 @@ while (1)
        if ($master_only)
        {
                $print_it = (@{ $winner->{'commits'} } == 1)
-                       && ($winner->{'commits'}[0]->{'branch'} eq 'master');
+                 && ($winner->{'commits'}[0]->{'branch'} eq 'master');
        }
        elsif ($non_master_only)
        {
@@ -374,20 +374,20 @@ sub output_details
                {
                        $item->{'message'} =~ m/^\s*(.*)/;
 
-                       output_str("%s [%s] %s\n",
-                                  substr($c->{'date'}, 0, 10),
-                                  substr($c->{'commit'}, 0, 9),
-                                  substr($1, 0, 56));
+                       output_str(
+                               "%s [%s] %s\n",
+                               substr($c->{'date'},   0, 10),
+                               substr($c->{'commit'}, 0, 9),
+                               substr($1,             0, 56));
                }
                else
                {
                        output_str("Branch: %s ", $c->{'branch'})
-                           if (!$master_only);
+                         if (!$master_only);
                        output_str("Release: %s ", $c->{'last_tag'})
-                           if (defined $c->{'last_tag'});
-                       output_str("[%s] %s\n",
-                                  substr($c->{'commit'}, 0, 9),
-                                  $c->{'date'});
+                         if (defined $c->{'last_tag'});
+                       output_str("[%s] %s\n", substr($c->{'commit'}, 0, 9),
+                               $c->{'date'});
                }
        }
        output_str("\n");
index 3c36c5df13eface2b8ceb52524782a95c3db06d3..031719d5d8eb7a86830edd133c8889818cc0d0a9 100644 (file)
@@ -582,7 +582,8 @@ sub CopyIncludeFiles
                'Public headers', $target . '/include/',
                'src/include/',   'postgres_ext.h',
                'pg_config.h',    'pg_config_ext.h',
-               'pg_config_os.h', 'dynloader.h', 'pg_config_manual.h');
+               'pg_config_os.h', 'dynloader.h',
+               'pg_config_manual.h');
        lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
          || croak 'Could not copy libpq-fs.h';
 
index e7268cb2ed3ff2f288b50a85eaad6098a38e3af7..fe905d3c9d154052991e97646daf06b4e680bc51 100644 (file)
@@ -41,9 +41,12 @@ my $contrib_extrasource = {
        'cube' => [ 'contrib/cube/cubescan.l', 'contrib/cube/cubeparse.y' ],
        'seg'  => [ 'contrib/seg/segscan.l',   'contrib/seg/segparse.y' ], };
 my @contrib_excludes = (
-       'commit_ts',       'hstore_plperl',    'hstore_plpython', 'intagg',
-       'ltree_plpython',  'pgcrypto',         'sepgsql',         'brin',
-       'test_extensions', 'test_pg_dump', 'snapshot_too_old');
+       'commit_ts',       'hstore_plperl',
+       'hstore_plpython', 'intagg',
+       'ltree_plpython',  'pgcrypto',
+       'sepgsql',         'brin',
+       'test_extensions', 'test_pg_dump',
+       'snapshot_too_old');
 
 # Set of variables for frontend modules
 my $frontend_defines = { 'initdb' => 'FRONTEND' };
@@ -63,9 +66,9 @@ my $frontend_extralibs = {
        'psql'       => ['ws2_32.lib'] };
 my $frontend_extraincludes = {
        'initdb' => ['src/timezone'],
-       'psql'   => [ 'src/backend' ] };
+       'psql'   => ['src/backend'] };
 my $frontend_extrasource = {
-       'psql' => [ 'src/bin/psql/psqlscanslash.l' ],
+       'psql' => ['src/bin/psql/psqlscanslash.l'],
        'pgbench' =>
          [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] };
 my @frontend_excludes = (
@@ -155,8 +158,10 @@ sub mkvcbuild
        $postgres->AddFiles('src/backend/bootstrap', 'bootscanner.l',
                'bootparse.y');
        $postgres->AddFiles('src/backend/utils/misc', 'guc-file.l');
-       $postgres->AddFiles('src/backend/replication', 'repl_scanner.l',
-               'repl_gram.y', 'syncrep_scanner.l', 'syncrep_gram.y');
+       $postgres->AddFiles(
+               'src/backend/replication', 'repl_scanner.l',
+               'repl_gram.y',             'syncrep_scanner.l',
+               'syncrep_gram.y');
        $postgres->AddDefine('BUILDING_DLL');
        $postgres->AddLibrary('secur32.lib');
        $postgres->AddLibrary('ws2_32.lib');
@@ -625,8 +630,7 @@ sub mkvcbuild
                        }
                }
                $proj->AddIncludeDir('src/interfaces/libpq');
-               $proj->AddReference($libpq, $libpgfeutils, $libpgcommon,
-                                   $libpgport);
+               $proj->AddReference($libpq, $libpgfeutils, $libpgcommon, $libpgport);
                $proj->AddDirResourceFile('src/bin/scripts');
                $proj->AddLibrary('ws2_32.lib');
        }
index 43620c249fa4693e1e4d1aa08aa6ffb9626e33ae..f07029bce1612cd15d02495b729a94f23284a206 100644 (file)
@@ -286,7 +286,8 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
        }
 
        if (IsNewer(
-                       'src/include/storage/lwlocknames.h', 'src/backend/storage/lmgr/lwlocknames.txt'))
+                       'src/include/storage/lwlocknames.h',
+                       'src/backend/storage/lmgr/lwlocknames.txt'))
        {
                print "Generating lwlocknames.c and lwlocknames.h...\n";
                chdir('src/backend/storage/lmgr');
@@ -297,13 +298,13 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
                        'src/include/storage/lwlocknames.h',
                        'src/backend/storage/lmgr/lwlocknames.h'))
        {
-               copyFile('src/backend/storage/lmgr/lwlocknames.h',
+               copyFile(
+                       'src/backend/storage/lmgr/lwlocknames.h',
                        'src/include/storage/lwlocknames.h');
        }
 
        if (IsNewer(
-                       'src/include/dynloader.h',
-                       'src/backend/port/dynloader/win32.h'))
+                       'src/include/dynloader.h', 'src/backend/port/dynloader/win32.h'))
        {
                copyFile('src/backend/port/dynloader/win32.h',
                        'src/include/dynloader.h');
@@ -352,8 +353,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 
        if ($self->{options}->{tcl}
                && IsNewer(
-                       'src/pl/tcl/pltclerrcodes.h',
-                       'src/backend/utils/errcodes.txt'))
+                       'src/pl/tcl/pltclerrcodes.h', 'src/backend/utils/errcodes.txt'))
        {
                print "Generating pltclerrcodes.h...\n";
                system(
@@ -653,9 +653,9 @@ sub GetFakeConfigure
        $cfg .= ' --enable-cassert' if ($self->{options}->{asserts});
        $cfg .= ' --enable-integer-datetimes'
          if ($self->{options}->{integer_datetimes});
-       $cfg .= ' --enable-nls' if ($self->{options}->{nls});
+       $cfg .= ' --enable-nls'       if ($self->{options}->{nls});
        $cfg .= ' --enable-tap-tests' if ($self->{options}->{tap_tests});
-       $cfg .= ' --with-ldap'  if ($self->{options}->{ldap});
+       $cfg .= ' --with-ldap'        if ($self->{options}->{ldap});
        $cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
        $cfg .= ' --with-extra-version' if ($self->{options}->{extraver});
        $cfg .= ' --with-openssl'       if ($self->{options}->{openssl});
index c4e4dc79a34a026e755200fc51743296c6e75c2e..007e3c73b25261f8898e641169122d0189619042 100644 (file)
@@ -53,7 +53,8 @@ elsif (uc($ARGV[0]) ne "RELEASE")
 if ($buildwhat and $vcver >= 10.00)
 {
        system(
-"msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf");
+               "msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf"
+       );
 }
 elsif ($buildwhat)
 {
index 33631b486b2c9f5f6ca08b25d99efaaf726fb77d..f046687bd0695207cb92f8ddbe06ccaa34bc7674 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 
 our $config = {
-       asserts  => 0,    # --enable-cassert
+       asserts => 0,    # --enable-cassert
          # integer_datetimes=>1,   # --enable-integer-datetimes - on is now default
          # float4byval=>1,         # --disable-float4-byval, on by default
 
index 0410e3aa02b036d99d30537bf029374e9333dc1b..474ce63e5ca0f829b24dfc1be05789081f40311a 100644 (file)
@@ -16,8 +16,8 @@ my ($flexver) = `flex -V`;    # grab first line
 $flexver = (split(/\s+/, $flexver))[1];
 $flexver =~ s/[^0-9.]//g;
 my @verparts = split(/\./, $flexver);
-unless ($verparts[0] == 2 &&
-           ($verparts[1] > 5 || ($verparts[1] == 5 && $verparts[2] >= 31)))
+unless ($verparts[0] == 2
+       && ($verparts[1] > 5 || ($verparts[1] == 5 && $verparts[2] >= 31)))
 {
        print "WARNING! Flex install not found, or unsupported Flex version.\n";
        print "echo Attempting to build without.\n";
index 52c403791d972c8a3fbb46edb710952c5047ccde..075279a00e71dc82121d58cca47c06fdb05dd0d7 100644 (file)
@@ -184,11 +184,11 @@ sub tap_check
        my $dir = shift;
        chdir $dir;
 
-       my @args = ( "prove", "--verbose", "t/*.pl");
+       my @args = ("prove", "--verbose", "t/*.pl");
 
        # adjust the environment for just this test
        local %ENV = %ENV;
-       $ENV{PERL5LIB} = "$topdir/src/test/perl;$ENV{PERL5LIB}";
+       $ENV{PERL5LIB}   = "$topdir/src/test/perl;$ENV{PERL5LIB}";
        $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress";
 
        $ENV{TESTDIR} = "$dir";
@@ -332,6 +332,7 @@ sub contribcheck
        my $mstat = 0;
        foreach my $module (glob("*"))
        {
+
                # these configuration-based exclusions must match Install.pm
                next if ($module eq "uuid-ossp"     && !defined($config->{uuid}));
                next if ($module eq "sslinfo"       && !defined($config->{openssl}));
@@ -365,8 +366,8 @@ sub recoverycheck
 {
        InstallTemp();
 
-       my $mstat = 0;
-       my $dir = "$topdir/src/test/recovery";
+       my $mstat  = 0;
+       my $dir    = "$topdir/src/test/recovery";
        my $status = tap_check($dir);
        exit $status if $status;
 }
@@ -547,20 +548,20 @@ sub InstallTemp
 sub usage
 {
        print STDERR
-               "Usage: vcregress.pl <mode> [ <schedule> ]\n\n",
-               "Options for <mode>:\n",
-               "  bincheck       run tests of utilities in src/bin/\n",
-               "  check          deploy instance and run regression tests on it\n",
-               "  contribcheck   run tests of modules in contrib/\n",
-               "  ecpgcheck      run regression tests of ECPG\n",
-               "  installcheck   run regression tests on existing instance\n",
-               "  isolationcheck run isolation tests\n",
-               "  modulescheck   run tests of modules in src/test/modules/\n",
-               "  plcheck        run tests of PL languages\n",
-               "  recoverycheck  run recovery test suite\n",
-               "  upgradecheck   run tests of pg_upgrade\n",
-               "\nOptions for <schedule>:\n",
-               "  serial         serial mode\n",
-               "  parallel       parallel mode\n";
+         "Usage: vcregress.pl <mode> [ <schedule> ]\n\n",
+         "Options for <mode>:\n",
+         "  bincheck       run tests of utilities in src/bin/\n",
+         "  check          deploy instance and run regression tests on it\n",
+         "  contribcheck   run tests of modules in contrib/\n",
+         "  ecpgcheck      run regression tests of ECPG\n",
+         "  installcheck   run regression tests on existing instance\n",
+         "  isolationcheck run isolation tests\n",
+         "  modulescheck   run tests of modules in src/test/modules/\n",
+         "  plcheck        run tests of PL languages\n",
+         "  recoverycheck  run recovery test suite\n",
+         "  upgradecheck   run tests of pg_upgrade\n",
+         "\nOptions for <schedule>:\n",
+         "  serial         serial mode\n",
+         "  parallel       parallel mode\n";
        exit(1);
 }