Reindent Perl files with perltidy version 20170521.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Apr 2018 18:00:19 +0000 (14:00 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Apr 2018 18:00:19 +0000 (14:00 -0400)
Discussion: https://postgr.es/m/CABUevEzK3cNiHZQ18f5tK0guoT+cN_jWeVzhYYxY=r+1Q3SmoA@mail.gmail.com

53 files changed:
doc/src/sgml/mk_feature_tables.pl
src/backend/catalog/Catalog.pm
src/backend/catalog/genbki.pl
src/backend/utils/Gen_fmgrtab.pl
src/bin/initdb/t/001_initdb.pl
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_basebackup/t/020_pg_receivewal.pl
src/bin/pg_controldata/t/001_pg_controldata.pl
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/pg_resetwal/t/001_basic.pl
src/bin/pg_resetwal/t/002_corrupted.pl
src/bin/pg_rewind/RewindTest.pm
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pgbench/t/001_pgbench_with_server.pl
src/bin/pgbench/t/002_pgbench_no_server.pl
src/bin/scripts/t/080_pg_isready.pl
src/bin/scripts/t/100_vacuumdb.pl
src/include/catalog/duplicate_oids
src/include/catalog/reformat_dat_file.pl
src/test/kerberos/t/001_auth.pl
src/test/ldap/t/001_auth.pl
src/test/modules/brin/t/01_workitems.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/006_logical_decoding.pl
src/test/recovery/t/009_twophase.pl
src/test/recovery/t/013_crash_restart.pl
src/test/recovery/t/014_unlogged_reinit.pl
src/test/ssl/ServerSetup.pm
src/test/ssl/t/001_ssltests.pl
src/test/ssl/t/002_scram.pl
src/test/subscription/t/001_rep_changes.pl
src/test/subscription/t/005_encoding.pl
src/test/subscription/t/006_rewrite.pl
src/test/subscription/t/007_ddl.pl
src/test/subscription/t/008_diff_schema.pl
src/test/subscription/t/009_matviews.pl
src/test/subscription/t/010_truncate.pl
src/tools/git_changelog
src/tools/msvc/Install.pm
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Project.pm
src/tools/msvc/Solution.pm
src/tools/msvc/VSObjectFactory.pm
src/tools/msvc/gendef.pl
src/tools/msvc/vcregress.pl
src/tools/pginclude/pgcheckdefines
src/tools/pgindent/pgindent

index 9b111b8b4096926fd55b382c6e327bb588723f19..476e50e66d0cf2433345f39ae48b6ed88c0b314c 100644 (file)
@@ -38,8 +38,8 @@ while (<$feat>)
 
        $is_supported eq $yesno || next;
 
-       $feature_name    =~ s/</&lt;/g;
-       $feature_name    =~ s/>/&gt;/g;
+       $feature_name =~ s/</&lt;/g;
+       $feature_name =~ s/>/&gt;/g;
        $subfeature_name =~ s/</&lt;/g;
        $subfeature_name =~ s/>/&gt;/g;
 
index 6305a2b36290a181c822db1ec864584bc507834a..ce425562f51557b190a4d76f300bd0295bde7503 100644 (file)
@@ -33,185 +33,186 @@ sub ParseHeader
                'TransactionId' => 'xid',
                'XLogRecPtr'    => 'pg_lsn');
 
-               my %catalog;
-               my $declaring_attributes = 0;
-               my $is_varlen     = 0;
-               my $is_client_code = 0;
+       my %catalog;
+       my $declaring_attributes = 0;
+       my $is_varlen            = 0;
+       my $is_client_code       = 0;
 
-               $catalog{columns} = [];
-               $catalog{toasting} = [];
-               $catalog{indexing} = [];
-               $catalog{client_code} = [];
+       $catalog{columns}     = [];
+       $catalog{toasting}    = [];
+       $catalog{indexing}    = [];
+       $catalog{client_code} = [];
 
-               open(my $ifh, '<', $input_file) || die "$input_file: $!";
+       open(my $ifh, '<', $input_file) || die "$input_file: $!";
 
-               # Scan the input file.
-               while (<$ifh>)
-               {
+       # Scan the input file.
+       while (<$ifh>)
+       {
 
-                       # Set appropriate flag when we're in certain code sections.
-                       if (/^#/)
+               # Set appropriate flag when we're in certain code sections.
+               if (/^#/)
+               {
+                       $is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/;
+                       if (/^#ifdef\s+EXPOSE_TO_CLIENT_CODE/)
                        {
-                               $is_varlen = 1 if /^#ifdef\s+CATALOG_VARLEN/;
-                               if (/^#ifdef\s+EXPOSE_TO_CLIENT_CODE/)
-                               {
-                                       $is_client_code = 1;
-                                       next;
-                               }
-                               next if !$is_client_code;
+                               $is_client_code = 1;
+                               next;
                        }
+                       next if !$is_client_code;
+               }
 
-                       if (!$is_client_code)
+               if (!$is_client_code)
+               {
+                       # Strip C-style comments.
+                       s;/\*(.|\n)*\*/;;g;
+                       if (m;/\*;)
                        {
-                               # Strip C-style comments.
-                               s;/\*(.|\n)*\*/;;g;
-                               if (m;/\*;)
-                               {
-
-                                       # handle multi-line comments properly.
-                                       my $next_line = <$ifh>;
-                                       die "$input_file: ends within C-style comment\n"
-                                         if !defined $next_line;
-                                       $_ .= $next_line;
-                                       redo;
-                               }
 
-                               # Strip useless whitespace and trailing semicolons.
-                               chomp;
-                               s/^\s+//;
-                               s/;\s*$//;
-                               s/\s+/ /g;
+                               # handle multi-line comments properly.
+                               my $next_line = <$ifh>;
+                               die "$input_file: ends within C-style comment\n"
+                                 if !defined $next_line;
+                               $_ .= $next_line;
+                               redo;
                        }
 
-                       # Push the data into the appropriate data structure.
-                       if (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
+                       # Strip useless whitespace and trailing semicolons.
+                       chomp;
+                       s/^\s+//;
+                       s/;\s*$//;
+                       s/\s+/ /g;
+               }
+
+               # Push the data into the appropriate data structure.
+               if (/^DECLARE_TOAST\(\s*(\w+),\s*(\d+),\s*(\d+)\)/)
+               {
+                       my ($toast_name, $toast_oid, $index_oid) = ($1, $2, $3);
+                       push @{ $catalog{toasting} },
+                         "declare toast $toast_oid $index_oid on $toast_name\n";
+               }
+               elsif (/^DECLARE_(UNIQUE_)?INDEX\(\s*(\w+),\s*(\d+),\s*(.+)\)/)
+               {
+                       my ($is_unique, $index_name, $index_oid, $using) =
+                         ($1, $2, $3, $4);
+                       push @{ $catalog{indexing} },
+                         sprintf(
+                               "declare %sindex %s %s %s\n",
+                               $is_unique ? 'unique ' : '',
+                               $index_name, $index_oid, $using);
+               }
+               elsif (/^BUILD_INDICES/)
+               {
+                       push @{ $catalog{indexing} }, "build indices\n";
+               }
+               elsif (/^CATALOG\((\w+),(\d+),(\w+)\)/)
+               {
+                       $catalog{catname}            = $1;
+                       $catalog{relation_oid}       = $2;
+                       $catalog{relation_oid_macro} = $3;
+
+                       $catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
+                       $catalog{shared_relation} =
+                         /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
+                       $catalog{without_oids} =
+                         /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
+                       if (/BKI_ROWTYPE_OID\((\d+),(\w+)\)/)
                        {
-                               my ($toast_name, $toast_oid, $index_oid) = ($1, $2, $3);
-                               push @{ $catalog{toasting} },
-                                 "declare toast $toast_oid $index_oid on $toast_name\n";
+                               $catalog{rowtype_oid}        = $1;
+                               $catalog{rowtype_oid_clause} = " rowtype_oid $1";
+                               $catalog{rowtype_oid_macro}  = $2;
                        }
-                       elsif (/^DECLARE_(UNIQUE_)?INDEX\(\s*(\w+),\s*(\d+),\s*(.+)\)/)
+                       else
                        {
-                               my ($is_unique, $index_name, $index_oid, $using) =
-                                 ($1, $2, $3, $4);
-                               push @{ $catalog{indexing} },
-                                 sprintf(
-                                       "declare %sindex %s %s %s\n",
-                                       $is_unique ? 'unique ' : '',
-                                       $index_name, $index_oid, $using);
+                               $catalog{rowtype_oid}        = '';
+                               $catalog{rowtype_oid_clause} = '';
+                               $catalog{rowtype_oid_macro}  = '';
                        }
-                       elsif (/^BUILD_INDICES/)
+                       $catalog{schema_macro} = /BKI_SCHEMA_MACRO/ ? 1 : 0;
+                       $declaring_attributes = 1;
+               }
+               elsif ($is_client_code)
+               {
+                       if (/^#endif/)
                        {
-                               push @{ $catalog{indexing} }, "build indices\n";
+                               $is_client_code = 0;
                        }
-                       elsif (/^CATALOG\((\w+),(\d+),(\w+)\)/)
+                       else
                        {
-                               $catalog{catname} = $1;
-                               $catalog{relation_oid} = $2;
-                               $catalog{relation_oid_macro} = $3;
-
-                               $catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
-                               $catalog{shared_relation} =
-                                 /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
-                               $catalog{without_oids} =
-                                 /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
-                               if (/BKI_ROWTYPE_OID\((\d+),(\w+)\)/)
-                               {
-                                       $catalog{rowtype_oid} = $1;
-                                       $catalog{rowtype_oid_clause} = " rowtype_oid $1";
-                                       $catalog{rowtype_oid_macro} = $2;
-                               }
-                               else
-                               {
-                                       $catalog{rowtype_oid} = '';
-                                       $catalog{rowtype_oid_clause} = '';
-                                       $catalog{rowtype_oid_macro} = '';
-                               }
-                               $catalog{schema_macro} = /BKI_SCHEMA_MACRO/ ? 1 : 0;
-                               $declaring_attributes = 1;
+                               push @{ $catalog{client_code} }, $_;
                        }
-                       elsif ($is_client_code)
+               }
+               elsif ($declaring_attributes)
+               {
+                       next if (/^{|^$/);
+                       if (/^}/)
                        {
-                               if (/^#endif/)
-                               {
-                                       $is_client_code = 0;
-                               }
-                               else
-                               {
-                                       push @{ $catalog{client_code} }, $_;
-                               }
+                               $declaring_attributes = 0;
                        }
-                       elsif ($declaring_attributes)
+                       else
                        {
-                               next if (/^{|^$/);
-                               if (/^}/)
+                               my %column;
+                               my @attopts = split /\s+/, $_;
+                               my $atttype = shift @attopts;
+                               my $attname = shift @attopts;
+                               die "parse error ($input_file)"
+                                 unless ($attname and $atttype);
+
+                               if (exists $RENAME_ATTTYPE{$atttype})
                                {
-                                       $declaring_attributes = 0;
+                                       $atttype = $RENAME_ATTTYPE{$atttype};
                                }
-                               else
+
+                               # If the C name ends with '[]' or '[digits]', we have
+                               # an array type, so we discard that from the name and
+                               # prepend '_' to the type.
+                               if ($attname =~ /(\w+)\[\d*\]/)
                                {
-                                       my %column;
-                                       my @attopts = split /\s+/, $_;
-                                       my $atttype = shift @attopts;
-                                       my $attname = shift @attopts;
-                                       die "parse error ($input_file)"
-                                         unless ($attname and $atttype);
-
-                                       if (exists $RENAME_ATTTYPE{$atttype})
+                                       $attname = $1;
+                                       $atttype = '_' . $atttype;
+                               }
+
+                               $column{type}      = $atttype;
+                               $column{name}      = $attname;
+                               $column{is_varlen} = 1 if $is_varlen;
+
+                               foreach my $attopt (@attopts)
+                               {
+                                       if ($attopt eq 'BKI_FORCE_NULL')
                                        {
-                                               $atttype = $RENAME_ATTTYPE{$atttype};
+                                               $column{forcenull} = 1;
                                        }
-
-                                       # If the C name ends with '[]' or '[digits]', we have
-                                       # an array type, so we discard that from the name and
-                                       # prepend '_' to the type.
-                                       if ($attname =~ /(\w+)\[\d*\]/)
+                                       elsif ($attopt eq 'BKI_FORCE_NOT_NULL')
                                        {
-                                               $attname = $1;
-                                               $atttype = '_' . $atttype;
+                                               $column{forcenotnull} = 1;
                                        }
 
-                                       $column{type} = $atttype;
-                                       $column{name} = $attname;
-                                       $column{is_varlen} = 1 if $is_varlen;
+                                       # We use quotes for values like \0 and \054, to
+                                       # make sure all compilers and syntax highlighters
+                                       # can recognize them properly.
+                                       elsif ($attopt =~ /BKI_DEFAULT\(['"]?([^'"]+)['"]?\)/)
+                                       {
+                                               $column{default} = $1;
+                                       }
+                                       elsif ($attopt =~ /BKI_LOOKUP\((\w+)\)/)
+                                       {
+                                               $column{lookup} = $1;
+                                       }
+                                       else
+                                       {
+                                               die
+                                                 "unknown column option $attopt on column $attname";
+                                       }
 
-                                       foreach my $attopt (@attopts)
+                                       if ($column{forcenull} and $column{forcenotnull})
                                        {
-                                               if ($attopt eq 'BKI_FORCE_NULL')
-                                               {
-                                                       $column{forcenull} = 1;
-                                               }
-                                               elsif ($attopt eq 'BKI_FORCE_NOT_NULL')
-                                               {
-                                                       $column{forcenotnull} = 1;
-                                               }
-                                               # We use quotes for values like \0 and \054, to
-                                               # make sure all compilers and syntax highlighters
-                                               # can recognize them properly.
-                                               elsif ($attopt =~ /BKI_DEFAULT\(['"]?([^'"]+)['"]?\)/)
-                                               {
-                                                       $column{default} = $1;
-                                               }
-                                               elsif ($attopt =~ /BKI_LOOKUP\((\w+)\)/)
-                                               {
-                                                       $column{lookup} = $1;
-                                               }
-                                               else
-                                               {
-                                                       die
-"unknown column option $attopt on column $attname";
-                                               }
-
-                                               if ($column{forcenull} and $column{forcenotnull})
-                                               {
-                                                       die "$attname is forced both null and not null";
-                                               }
+                                               die "$attname is forced both null and not null";
                                        }
-                                       push @{ $catalog{columns} }, \%column;
                                }
+                               push @{ $catalog{columns} }, \%column;
                        }
                }
-               close $ifh;
+       }
+       close $ifh;
        return \%catalog;
 }
 
@@ -228,7 +229,7 @@ sub ParseData
        $input_file =~ /(\w+)\.dat$/
          or die "Input file $input_file needs to be a .dat file.\n";
        my $catname = $1;
-       my $data = [];
+       my $data    = [];
 
        # Scan the input file.
        while (<$ifd>)
@@ -311,8 +312,9 @@ sub AddDefaultValues
                {
                        $row->{$attname} = $column->{default};
                }
-               elsif ($catname eq 'pg_proc' && $attname eq 'pronargs' &&
-                          defined($row->{proargtypes}))
+               elsif ($catname eq 'pg_proc'
+                       && $attname eq 'pronargs'
+                       && defined($row->{proargtypes}))
                {
                        # pg_proc.pronargs can be derived from proargtypes.
                        my @proargtypes = split /\s+/, $row->{proargtypes};
@@ -328,7 +330,7 @@ sub AddDefaultValues
        if (@missing_fields)
        {
                die sprintf "missing values for field(s) %s in %s.dat line %s\n",
-                       join(', ', @missing_fields), $catname, $row->{line_number};
+                 join(', ', @missing_fields), $catname, $row->{line_number};
        }
 }
 
@@ -379,7 +381,7 @@ sub FindDefinedSymbol
 sub FindDefinedSymbolFromData
 {
        my ($data, $symbol) = @_;
-       foreach my $row (@{ $data })
+       foreach my $row (@{$data})
        {
                if ($row->{oid_symbol} eq $symbol)
                {
index 9cf26263f8f2e2090c522312fbc71847cc953fe9..5d4fa5c154420d7616678cd69d7b3b0ebaae5284 100644 (file)
@@ -116,10 +116,12 @@ foreach my $header (@input_files)
 # within a given Postgres release, such as fixed OIDs.  Do not substitute
 # anything that could depend on platform or configuration.  (The right place
 # to handle those sorts of things is in initdb.c's bootstrap_template1().)
-my $BOOTSTRAP_SUPERUSERID = Catalog::FindDefinedSymbolFromData(
-       $catalog_data{pg_authid}, 'BOOTSTRAP_SUPERUSERID');
-my $PG_CATALOG_NAMESPACE  = Catalog::FindDefinedSymbolFromData(
-       $catalog_data{pg_namespace}, 'PG_CATALOG_NAMESPACE');
+my $BOOTSTRAP_SUPERUSERID =
+  Catalog::FindDefinedSymbolFromData($catalog_data{pg_authid},
+       'BOOTSTRAP_SUPERUSERID');
+my $PG_CATALOG_NAMESPACE =
+  Catalog::FindDefinedSymbolFromData($catalog_data{pg_namespace},
+       'PG_CATALOG_NAMESPACE');
 
 
 # Build lookup tables for OID macro substitutions and for pg_attribute
@@ -138,8 +140,7 @@ foreach my $row (@{ $catalog_data{pg_opclass} })
 {
        # There is no unique name, so we need to combine access method
        # and opclass name.
-       my $key = sprintf "%s/%s",
-         $row->{opcmethod}, $row->{opcname};
+       my $key = sprintf "%s/%s", $row->{opcmethod}, $row->{opcname};
        $opcoids{$key} = $row->{oid};
 }
 
@@ -160,8 +161,7 @@ foreach my $row (@{ $catalog_data{pg_opfamily} })
 {
        # There is no unique name, so we need to combine access method
        # and opfamily name.
-       my $key = sprintf "%s/%s",
-         $row->{opfmethod}, $row->{opfname};
+       my $key = sprintf "%s/%s", $row->{opfmethod}, $row->{opfname};
        $opfoids{$key} = $row->{oid};
 }
 
@@ -179,6 +179,7 @@ foreach my $row (@{ $catalog_data{pg_proc} })
        {
                $procoids{$prokey} = $row->{oid};
        }
+
        # Also generate an entry using proname(proargtypes).  This is not quite
        # identical to regprocedure lookup because we don't worry much about
        # special SQL names for types etc; we just use the names in the source
@@ -201,7 +202,7 @@ my %types;
 foreach my $row (@{ $catalog_data{pg_type} })
 {
        $typeoids{ $row->{typname} } = $row->{oid};
-       $types{ $row->{typname} } = $row;
+       $types{ $row->{typname} }    = $row;
 }
 
 # Map catalog name to OID lookup.
@@ -211,8 +212,7 @@ my %lookup_kind = (
        pg_operator => \%operoids,
        pg_opfamily => \%opfoids,
        pg_proc     => \%procoids,
-       pg_type     => \%typeoids
-);
+       pg_type     => \%typeoids);
 
 
 # Generate postgres.bki, postgres.description, postgres.shdescription,
@@ -345,11 +345,14 @@ EOM
                # Complain about unrecognized keys; they are presumably misspelled
                foreach my $key (keys %bki_values)
                {
-                       next if $key eq "oid" || $key eq "oid_symbol" || $key eq "descr"
-                               || $key eq "line_number";
+                       next
+                         if $key eq "oid"
+                         || $key eq "oid_symbol"
+                         || $key eq "descr"
+                         || $key eq "line_number";
                        die sprintf "unrecognized field name \"%s\" in %s.dat line %s\n",
-                               $key, $catname, $bki_values{line_number}
-                               if (!exists($attnames{$key}));
+                         $key, $catname, $bki_values{line_number}
+                         if (!exists($attnames{$key}));
                }
 
                # Perform required substitutions on fields
@@ -379,8 +382,8 @@ EOM
                                if ($atttype eq 'oidvector')
                                {
                                        @lookupnames = split /\s+/, $bki_values{$attname};
-                                       @lookupoids = lookup_oids($lookup, $catname,
-                                                                                         \%bki_values, @lookupnames);
+                                       @lookupoids = lookup_oids($lookup, $catname, \%bki_values,
+                                               @lookupnames);
                                        $bki_values{$attname} = join(' ', @lookupoids);
                                }
                                elsif ($atttype eq '_oid')
@@ -389,17 +392,18 @@ EOM
                                        {
                                                $bki_values{$attname} =~ s/[{}]//g;
                                                @lookupnames = split /,/, $bki_values{$attname};
-                                               @lookupoids = lookup_oids($lookup, $catname,
-                                                                                                 \%bki_values, @lookupnames);
-                                               $bki_values{$attname} =
-                                                       sprintf "{%s}", join(',', @lookupoids);
+                                               @lookupoids =
+                                                 lookup_oids($lookup, $catname, \%bki_values,
+                                                       @lookupnames);
+                                               $bki_values{$attname} = sprintf "{%s}",
+                                                 join(',', @lookupoids);
                                        }
                                }
                                else
                                {
                                        $lookupnames[0] = $bki_values{$attname};
-                                       @lookupoids = lookup_oids($lookup, $catname,
-                                                                                         \%bki_values, @lookupnames);
+                                       @lookupoids = lookup_oids($lookup, $catname, \%bki_values,
+                                               @lookupnames);
                                        $bki_values{$attname} = $lookupoids[0];
                                }
                        }
@@ -562,7 +566,7 @@ sub gen_pg_attribute
                        morph_row_for_schemapg(\%row, $schema);
                        push @{ $schemapg_entries{$table_name} },
                          sprintf "{ %s }",
-                               join(', ', grep { defined $_ } @row{@attnames});
+                         join(', ', grep { defined $_ } @row{@attnames});
                }
 
                # Generate entries for system attributes.
@@ -589,7 +593,7 @@ sub gen_pg_attribute
                                # Omit the oid column if the catalog doesn't have them
                                next
                                  if $table->{without_oids}
-                                         && $attr->{name} eq 'oid';
+                                 && $attr->{name} eq 'oid';
 
                                morph_row_for_pgattr(\%row, $schema, $attr, 1);
                                print_bki_insert(\%row, $schema);
@@ -641,11 +645,11 @@ sub morph_row_for_pgattr
                # compare DefineAttr in bootstrap.c. oidvector and
                # int2vector are also treated as not-nullable.
                $row->{attnotnull} =
-               $type->{typname} eq 'oidvector'   ? 't'
-               : $type->{typname} eq 'int2vector'  ? 't'
-               : $type->{typlen}  eq 'NAMEDATALEN' ? 't'
-               : $type->{typlen} > 0 ? 't'
-               :                       'f';
+                   $type->{typname} eq 'oidvector'  ? 't'
+                 : $type->{typname} eq 'int2vector' ? 't'
+                 : $type->{typlen} eq 'NAMEDATALEN' ? 't'
+                 : $type->{typlen} > 0              ? 't'
+                 :                                    'f';
        }
        else
        {
@@ -686,7 +690,7 @@ sub print_bki_insert
                # the "id" pattern in bootscanner.l, currently "[-A-Za-z0-9_]+".
                $bki_value = sprintf(qq'"%s"', $bki_value)
                  if length($bki_value) == 0
-                        or $bki_value =~ /[^-A-Za-z0-9_]/;
+                 or $bki_value =~ /[^-A-Za-z0-9_]/;
 
                push @bki_values, $bki_value;
        }
@@ -725,7 +729,7 @@ sub morph_row_for_schemapg
                # don't change.
                elsif ($atttype eq 'bool')
                {
-                       $row->{$attname} = 'true' if $row->{$attname} eq 't';
+                       $row->{$attname} = 'true'  if $row->{$attname} eq 't';
                        $row->{$attname} = 'false' if $row->{$attname} eq 'f';
                }
 
@@ -756,9 +760,10 @@ sub lookup_oids
                else
                {
                        push @lookupoids, $lookupname;
-                       warn sprintf "unresolved OID reference \"%s\" in %s.dat line %s\n",
-                               $lookupname, $catname, $bki_values->{line_number}
-                               if $lookupname ne '-' and $lookupname ne '0';
+                       warn sprintf
+                         "unresolved OID reference \"%s\" in %s.dat line %s\n",
+                         $lookupname, $catname, $bki_values->{line_number}
+                         if $lookupname ne '-' and $lookupname ne '0';
                }
        }
        return @lookupoids;
@@ -772,10 +777,10 @@ sub form_pg_type_symbol
        # Skip for rowtypes of bootstrap catalogs, since they have their
        # own naming convention defined elsewhere.
        return
-         if $typename eq 'pg_type'
-           or $typename eq 'pg_proc'
-           or $typename eq 'pg_attribute'
-           or $typename eq 'pg_class';
+            if $typename eq 'pg_type'
+         or $typename eq 'pg_proc'
+         or $typename eq 'pg_attribute'
+         or $typename eq 'pg_class';
 
        # Transform like so:
        #  foo_bar  ->  FOO_BAROID
index 4f5af79d0b565c4c3c8cf1fa0b6e168742349259..3ba1611f18b6947668b021ab3ab362d97112738e 100644 (file)
@@ -68,7 +68,7 @@ foreach my $datfile (@input_files)
 
        my $header = "$1.h";
        die "There in no header file corresponding to $datfile"
-         if ! -e $header;
+         if !-e $header;
 
        my $catalog = Catalog::ParseHeader($header);
        my $catname = $catalog->{catname};
@@ -79,10 +79,12 @@ foreach my $datfile (@input_files)
 }
 
 # Fetch some values for later.
-my $FirstBootstrapObjectId = Catalog::FindDefinedSymbol(
-       'access/transam.h', \@include_path, 'FirstBootstrapObjectId');
-my $INTERNALlanguageId = Catalog::FindDefinedSymbolFromData(
-       $catalog_data{pg_language}, 'INTERNALlanguageId');
+my $FirstBootstrapObjectId =
+  Catalog::FindDefinedSymbol('access/transam.h', \@include_path,
+       'FirstBootstrapObjectId');
+my $INTERNALlanguageId =
+  Catalog::FindDefinedSymbolFromData($catalog_data{pg_language},
+       'INTERNALlanguageId');
 
 print "Generating fmgrtab.c, fmgroids.h, and fmgrprotos.h...\n";
 
@@ -230,7 +232,7 @@ foreach my $s (sort { $a->{oid} <=> $b->{oid} } @fmgr)
        print $tfh
 "  { $s->{oid}, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} }";
 
-       $fmgr_builtin_oid_index[$s->{oid}] = $fmgr_count++;
+       $fmgr_builtin_oid_index[ $s->{oid} ] = $fmgr_count++;
 
        if ($fmgr_count <= $#fmgr)
        {
index 8609d2ecbcca34a5b5d18b71d47a9aad337a016f..599460ca883b81bdd3c0f9e23df9d66cac6b83f1 100644 (file)
@@ -49,12 +49,13 @@ mkdir $datadir;
                'successful creation');
 
        # Permissions on PGDATA should be default
-       SKIP:
+  SKIP:
        {
-               skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+               skip "unix-style permissions not supported on Windows", 1
+                 if ($windows_os);
 
                ok(check_mode_recursive($datadir, 0700, 0600),
-                  "check PGDATA permissions");
+                       "check PGDATA permissions");
        }
 }
 command_ok([ 'initdb', '-S', $datadir ], 'sync only');
@@ -63,7 +64,8 @@ command_fails([ 'initdb', $datadir ], 'existing data directory');
 # Check group access on PGDATA
 SKIP:
 {
-       skip "unix-style permissions not supported on Windows", 2 if ($windows_os);
+       skip "unix-style permissions not supported on Windows", 2
+         if ($windows_os);
 
        # Init a new db with group access
        my $datadir_group = "$tempdir/data_group";
index 1d3a1e4fb926d009c5367cde00263eea1db2cb0d..fdedd2faaa5242f8792362c50f5b26e0c3cb6333 100644 (file)
@@ -10,11 +10,8 @@ program_options_handling_ok('pg_archivecleanup');
 my $tempdir = TestLib::tempdir;
 
 my @walfiles = (
-       '00000001000000370000000C.gz',
-       '00000001000000370000000D',
-       '00000001000000370000000E',
-       '00000001000000370000000F.partial',
-);
+       '00000001000000370000000C.gz', '00000001000000370000000D',
+       '00000001000000370000000E',    '00000001000000370000000F.partial',);
 
 sub create_files
 {
@@ -28,32 +25,41 @@ sub create_files
 
 create_files();
 
-command_fails_like(['pg_archivecleanup'],
-                                  qr/must specify archive location/,
-                                  'fails if archive location is not specified');
+command_fails_like(
+       ['pg_archivecleanup'],
+       qr/must specify archive location/,
+       'fails if archive location is not specified');
 
-command_fails_like(['pg_archivecleanup', $tempdir],
-                                  qr/must specify oldest kept WAL file/,
-                                  'fails if oldest kept WAL file name is not specified');
+command_fails_like(
+       [ 'pg_archivecleanup', $tempdir ],
+       qr/must specify oldest kept WAL file/,
+       'fails if oldest kept WAL file name is not specified');
 
-command_fails_like(['pg_archivecleanup', 'notexist', 'foo'],
-                                  qr/archive location .* does not exist/,
-                                  'fails if archive location does not exist');
+command_fails_like(
+       [ 'pg_archivecleanup', 'notexist', 'foo' ],
+       qr/archive location .* does not exist/,
+       'fails if archive location does not exist');
 
-command_fails_like(['pg_archivecleanup', $tempdir, 'foo', 'bar'],
-                                  qr/too many command-line arguments/,
-                                  'fails with too many command-line arguments');
+command_fails_like(
+       [ 'pg_archivecleanup', $tempdir, 'foo', 'bar' ],
+       qr/too many command-line arguments/,
+       'fails with too many command-line arguments');
 
-command_fails_like(['pg_archivecleanup', $tempdir, 'foo'],
-                                  qr/invalid file name argument/,
-                                  'fails with invalid restart file name');
+command_fails_like(
+       [ 'pg_archivecleanup', $tempdir, 'foo' ],
+       qr/invalid file name argument/,
+       'fails with invalid restart file name');
 
 {
        # like command_like but checking stderr
        my $stderr;
-       my $result = IPC::Run::run ['pg_archivecleanup', '-d', '-n', $tempdir, $walfiles[2]], '2>', \$stderr;
+       my $result = IPC::Run::run [ 'pg_archivecleanup', '-d', '-n', $tempdir,
+               $walfiles[2] ], '2>', \$stderr;
        ok($result, "pg_archivecleanup dry run: exit code 0");
-       like($stderr, qr/$walfiles[1].*would be removed/, "pg_archivecleanup dry run: matches");
+       like(
+               $stderr,
+               qr/$walfiles[1].*would be removed/,
+               "pg_archivecleanup dry run: matches");
        foreach my $fn (@walfiles)
        {
                ok(-f "$tempdir/$fn", "$fn not removed");
@@ -66,16 +72,23 @@ sub run_check
 
        create_files();
 
-       command_ok(['pg_archivecleanup', '-x', '.gz', $tempdir, $walfiles[2] . $suffix],
-                          "$test_name: runs");
-
-       ok(! -f "$tempdir/$walfiles[0]", "$test_name: first older WAL file was cleaned up");
-       ok(! -f "$tempdir/$walfiles[1]", "$test_name: second older WAL file was cleaned up");
-       ok(-f "$tempdir/$walfiles[2]", "$test_name: restartfile was not cleaned up");
-       ok(-f "$tempdir/$walfiles[3]", "$test_name: newer WAL file was not cleaned up");
-       ok(-f "$tempdir/unrelated_file", "$test_name: unrelated file was not cleaned up");
+       command_ok(
+               [   'pg_archivecleanup', '-x', '.gz', $tempdir,
+                       $walfiles[2] . $suffix ],
+               "$test_name: runs");
+
+       ok(!-f "$tempdir/$walfiles[0]",
+               "$test_name: first older WAL file was cleaned up");
+       ok(!-f "$tempdir/$walfiles[1]",
+               "$test_name: second older WAL file was cleaned up");
+       ok(-f "$tempdir/$walfiles[2]",
+               "$test_name: restartfile was not cleaned up");
+       ok(-f "$tempdir/$walfiles[3]",
+               "$test_name: newer WAL file was not cleaned up");
+       ok(-f "$tempdir/unrelated_file",
+               "$test_name: unrelated file was not cleaned up");
 }
 
-run_check('', 'pg_archivecleanup');
-run_check('.partial', 'pg_archivecleanup with .partial file');
+run_check('',                 'pg_archivecleanup');
+run_check('.partial',         'pg_archivecleanup with .partial file');
 run_check('.00000020.backup', 'pg_archivecleanup with .backup file');
index 0cd510eeea4dddaf407832e3548a8dce6f63eac3..1c80ff74917bedc2c77db95e481e317d9c348d36 100644 (file)
@@ -20,7 +20,7 @@ my $node = get_new_node('main');
 umask(0077);
 
 # Initialize node without replication settings
-$node->init(extra => [ '--data-checksums' ]);
+$node->init(extra => ['--data-checksums']);
 $node->start;
 my $pgdata = $node->data_dir;
 
@@ -47,7 +47,7 @@ ok(!-d "$tempdir/backup", 'backup directory was cleaned up');
 # Create a backup directory that is not empty so the next commnd will fail
 # but leave the data directory behind
 mkdir("$tempdir/backup")
-       or BAIL_OUT("unable to create $tempdir/backup");
+  or BAIL_OUT("unable to create $tempdir/backup");
 append_to_file("$tempdir/backup/dir-not-empty.txt", "Some data");
 
 $node->command_fails([ 'pg_basebackup', '-D', "$tempdir/backup", '-n' ],
@@ -86,13 +86,14 @@ my $baseUnloggedPath = $node->safe_psql('postgres',
 
 # Make sure main and init forks exist
 ok(-f "$pgdata/${baseUnloggedPath}_init", 'unlogged init fork in base');
-ok(-f "$pgdata/$baseUnloggedPath", 'unlogged main fork in base');
+ok(-f "$pgdata/$baseUnloggedPath",        'unlogged main fork in base');
 
 # Create files that look like temporary relations to ensure they are ignored.
 my $postgresOid = $node->safe_psql('postgres',
        q{select oid from pg_database where datname = 'postgres'});
 
-my @tempRelationFiles = qw(t999_999 t9999_999.1 t999_9999_vm t99999_99999_vm.1);
+my @tempRelationFiles =
+  qw(t999_999 t9999_999.1 t999_9999_vm t99999_99999_vm.1);
 
 foreach my $filename (@tempRelationFiles)
 {
@@ -107,10 +108,11 @@ ok(-f "$tempdir/backup/PG_VERSION", 'backup was created');
 # Permissions on backup should be default
 SKIP:
 {
-       skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+       skip "unix-style permissions not supported on Windows", 1
+         if ($windows_os);
 
        ok(check_mode_recursive("$tempdir/backup", 0700, 0600),
-          "check backup dir permissions");
+               "check backup dir permissions");
 }
 
 # Only archive_status directory should be copied in pg_wal/.
@@ -133,8 +135,7 @@ foreach my $dirname (
 # These files should not be copied.
 foreach my $filename (
        qw(postgresql.auto.conf.tmp postmaster.opts postmaster.pid tablespace_map current_logfiles.tmp
-               global/pg_internal.init)
-  )
+       global/pg_internal.init))
 {
        ok(!-f "$tempdir/backup/$filename", "$filename not copied");
 }
@@ -142,14 +143,14 @@ foreach my $filename (
 # Unlogged relation forks other than init should not be copied
 ok(-f "$tempdir/backup/${baseUnloggedPath}_init",
        'unlogged init fork in backup');
-ok(!-f "$tempdir/backup/$baseUnloggedPath",
+ok( !-f "$tempdir/backup/$baseUnloggedPath",
        'unlogged main fork not in backup');
 
 # Temp relations should not be copied.
 foreach my $filename (@tempRelationFiles)
 {
-       ok(!-f "$tempdir/backup/base/$postgresOid/$filename",
-          "base/$postgresOid/$filename not copied");
+       ok( !-f "$tempdir/backup/base/$postgresOid/$filename",
+               "base/$postgresOid/$filename not copied");
 }
 
 # Make sure existing backup_label was ignored.
@@ -212,7 +213,7 @@ SKIP:
        # Move pg_replslot out of $pgdata and create a symlink to it.
        $node->stop;
 
-       # Set umask so test directories and files are created with group permissions
+  # Set umask so test directories and files are created with group permissions
        umask(0027);
 
        # Enable group permissions on PGDATA
@@ -244,24 +245,27 @@ SKIP:
        is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
        rmtree("$tempdir/tarbackup2");
 
      # Create an unlogged table to test that forks other than init are not copied.
+ # Create an unlogged table to test that forks other than init are not copied.
        $node->safe_psql('postgres',
-               'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;');
+               'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;'
+       );
 
-       my $tblspc1UnloggedPath = $node->safe_psql(
-               'postgres', q{select pg_relation_filepath('tblspc1_unlogged')});
+       my $tblspc1UnloggedPath = $node->safe_psql('postgres',
+               q{select pg_relation_filepath('tblspc1_unlogged')});
 
        # Make sure main and init forks exist
-       ok(-f "$pgdata/${tblspc1UnloggedPath}_init",
+       ok( -f "$pgdata/${tblspc1UnloggedPath}_init",
                'unlogged init fork in tablespace');
-       ok(-f "$pgdata/$tblspc1UnloggedPath",
-               'unlogged main fork in tablespace');
+       ok(-f "$pgdata/$tblspc1UnloggedPath", 'unlogged main fork in tablespace');
 
-       # Create files that look like temporary relations to ensure they are ignored
-       # in a tablespace.
+  # Create files that look like temporary relations to ensure they are ignored
+  # in a tablespace.
        my @tempRelationFiles = qw(t888_888 t888888_888888_vm.1);
-       my $tblSpc1Id = basename(dirname(dirname($node->safe_psql('postgres',
-               q{select pg_relation_filepath('test1')}))));
+       my $tblSpc1Id         = basename(
+               dirname(
+                       dirname(
+                               $node->safe_psql(
+                                       'postgres', q{select pg_relation_filepath('test1')}))));
 
        foreach my $filename (@tempRelationFiles)
        {
@@ -284,16 +288,17 @@ SKIP:
                                -l "$tempdir/backup1/pg_tblspc/$_"
                                  and readlink "$tempdir/backup1/pg_tblspc/$_" eq
                                  "$tempdir/tbackup/tblspc1"
-                         } readdir($dh)),
+                       } readdir($dh)),
                "tablespace symlink was updated");
        closedir $dh;
 
        # Group access should be enabled on all backup files
        ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
-          "check backup dir permissions");
+               "check backup dir permissions");
 
        # Unlogged relation forks other than init should not be copied
-       my ($tblspc1UnloggedBackupPath) = $tblspc1UnloggedPath =~ /[^\/]*\/[^\/]*\/[^\/]*$/g;
+       my ($tblspc1UnloggedBackupPath) =
+         $tblspc1UnloggedPath =~ /[^\/]*\/[^\/]*\/[^\/]*$/g;
 
        ok(-f "$tempdir/tbackup/tblspc1/${tblspc1UnloggedBackupPath}_init",
                'unlogged init fork in tablespace backup');
@@ -303,15 +308,15 @@ SKIP:
        # Temp relations should not be copied.
        foreach my $filename (@tempRelationFiles)
        {
-               ok(!-f "$tempdir/tbackup/tblspc1/$tblSpc1Id/$postgresOid/$filename",
-                  "[tblspc1]/$postgresOid/$filename not copied");
+               ok( !-f "$tempdir/tbackup/tblspc1/$tblSpc1Id/$postgresOid/$filename",
+                       "[tblspc1]/$postgresOid/$filename not copied");
 
                # Also remove temp relation files or tablespace drop will fail.
                my $filepath =
-                       "$shorter_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename";
+                 "$shorter_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename";
 
                unlink($filepath)
-                       or BAIL_OUT("unable to unlink $filepath");
+                 or BAIL_OUT("unable to unlink $filepath");
        }
 
        ok( -d "$tempdir/backup1/pg_replslot",
@@ -398,27 +403,35 @@ $node->command_fails(
        'pg_basebackup fails with nonexistent replication slot');
 
 $node->command_fails(
-       [   'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C' ],
+       [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C' ],
        'pg_basebackup -C fails without slot name');
 
 $node->command_fails(
-       [   'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C', '-S', 'slot0', '--no-slot' ],
+       [   'pg_basebackup',          '-D',
+               "$tempdir/backupxs_slot", '-C',
+               '-S',                     'slot0',
+               '--no-slot' ],
        'pg_basebackup fails with -C -S --no-slot');
 
 $node->command_ok(
-       [   'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C', '-S', 'slot0' ],
+       [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C', '-S', 'slot0' ],
        'pg_basebackup -C runs');
 rmtree("$tempdir/backupxs_slot");
 
-is($node->safe_psql('postgres', q{SELECT slot_name FROM pg_replication_slots WHERE slot_name = 'slot0'}),
-   'slot0',
-   'replication slot was created');
-isnt($node->safe_psql('postgres', q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot0'}),
-   '',
-   'restart LSN of new slot is not null');
+is( $node->safe_psql(
+               'postgres',
+q{SELECT slot_name FROM pg_replication_slots WHERE slot_name = 'slot0'}),
+       'slot0',
+       'replication slot was created');
+isnt(
+       $node->safe_psql(
+               'postgres',
+q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot0'}),
+       '',
+       'restart LSN of new slot is not null');
 
 $node->command_fails(
-       [   'pg_basebackup', '-D', "$tempdir/backupxs_slot1", '-C', '-S', 'slot0' ],
+       [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot1", '-C', '-S', 'slot0' ],
        'pg_basebackup fails with -C -S and a previously existing slot');
 
 $node->safe_psql('postgres',
@@ -455,10 +468,10 @@ rmtree("$tempdir/backupxs_sl_R");
 
 # create tables to corrupt and get their relfilenodes
 my $file_corrupt1 = $node->safe_psql('postgres',
-        q{SELECT a INTO corrupt1 FROM generate_series(1,10000) AS a; ALTER TABLE corrupt1 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt1')}
+q{SELECT a INTO corrupt1 FROM generate_series(1,10000) AS a; ALTER TABLE corrupt1 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt1')}
 );
 my $file_corrupt2 = $node->safe_psql('postgres',
-        q{SELECT b INTO corrupt2 FROM generate_series(1,2) AS b; ALTER TABLE corrupt2 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt2')}
+q{SELECT b INTO corrupt2 FROM generate_series(1,2) AS b; ALTER TABLE corrupt2 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt2')}
 );
 
 # set page header and block sizes
@@ -473,31 +486,32 @@ syswrite($file, '\0\0\0\0\0\0\0\0\0');
 close $file;
 system_or_bail 'pg_ctl', '-D', $pgdata, 'start';
 
-$node->command_checks_all([ 'pg_basebackup', '-D', "$tempdir/backup_corrupt"],
+$node->command_checks_all(
+       [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt" ],
        1,
        [qr{^$}],
        [qr/^WARNING.*checksum verification failed/s],
-       'pg_basebackup reports checksum mismatch'
-);
+       'pg_basebackup reports checksum mismatch');
 rmtree("$tempdir/backup_corrupt");
 
 # induce further corruption in 5 more blocks
 system_or_bail 'pg_ctl', '-D', $pgdata, 'stop';
 open $file, '+<', "$pgdata/$file_corrupt1";
-for my $i ( 1..5 ) {
-  my $offset = $pageheader_size + $i * $block_size;
-  seek($file, $offset, 0);
-  syswrite($file, '\0\0\0\0\0\0\0\0\0');
+for my $i (1 .. 5)
+{
+       my $offset = $pageheader_size + $i * $block_size;
+       seek($file, $offset, 0);
+       syswrite($file, '\0\0\0\0\0\0\0\0\0');
 }
 close $file;
 system_or_bail 'pg_ctl', '-D', $pgdata, 'start';
 
-$node->command_checks_all([ 'pg_basebackup', '-D', "$tempdir/backup_corrupt2"],
-        1,
-        [qr{^$}],
-        [qr/^WARNING.*further.*failures.*will.not.be.reported/s],
-        'pg_basebackup does not report more than 5 checksum mismatches'
-);
+$node->command_checks_all(
+       [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt2" ],
+       1,
+       [qr{^$}],
+       [qr/^WARNING.*further.*failures.*will.not.be.reported/s],
+       'pg_basebackup does not report more than 5 checksum mismatches');
 rmtree("$tempdir/backup_corrupt2");
 
 # induce corruption in a second file
@@ -508,17 +522,17 @@ syswrite($file, '\0\0\0\0\0\0\0\0\0');
 close $file;
 system_or_bail 'pg_ctl', '-D', $pgdata, 'start';
 
-$node->command_checks_all([ 'pg_basebackup', '-D', "$tempdir/backup_corrupt3"],
-        1,
-        [qr{^$}],
-        [qr/^WARNING.*7 total checksum verification failures/s],
-        'pg_basebackup correctly report the total number of checksum mismatches'
-);
+$node->command_checks_all(
+       [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt3" ],
+       1,
+       [qr{^$}],
+       [qr/^WARNING.*7 total checksum verification failures/s],
+       'pg_basebackup correctly report the total number of checksum mismatches');
 rmtree("$tempdir/backup_corrupt3");
 
 # do not verify checksums, should return ok
 $node->command_ok(
-       [   'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '-k' ],
+       [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt4", '-k' ],
        'pg_basebackup with -k does not report checksum mismatch');
 rmtree("$tempdir/backup_corrupt4");
 
index 19c106d9f59d28e71a82b4ba6bd56687c7c1f291..0793f9c11586f6179f54846f0fdb9ba782577fd8 100644 (file)
@@ -41,7 +41,8 @@ is($slot->{'slot_type'}, 'physical', 'physical replication slot was created');
 is($slot->{'restart_lsn'}, '', 'restart LSN of new slot is null');
 $primary->command_ok([ 'pg_receivewal', '--slot', $slot_name, '--drop-slot' ],
        'dropping a replication slot');
-is($primary->slot($slot_name)->{'slot_type'}, '', 'replication slot was removed');
+is($primary->slot($slot_name)->{'slot_type'},
+       '', 'replication slot was removed');
 
 # Generate some WAL.  Use --synchronous at the same time to add more
 # code coverage.  Switch to the next segment first so that subsequent
@@ -63,8 +64,9 @@ $primary->command_ok(
 # Permissions on WAL files should be default
 SKIP:
 {
-       skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+       skip "unix-style permissions not supported on Windows", 1
+         if ($windows_os);
 
        ok(check_mode_recursive($stream_dir, 0700, 0600),
-          "check stream dir permissions");
+               "check stream dir permissions");
 }
index af9fad7a38b8ce2a1e800c55510c246a289efa78..c641c9c5f767542eb101f9aaf7d64b49141566d1 100644 (file)
@@ -21,17 +21,20 @@ command_like([ 'pg_controldata', $node->data_dir ],
 # check with a corrupted pg_control
 
 my $pg_control = $node->data_dir . '/global/pg_control';
-my $size = (stat($pg_control))[7];
+my $size       = (stat($pg_control))[7];
 
 open my $fh, '>', $pg_control or BAIL_OUT($!);
 binmode $fh;
+
 # fill file with zeros
 print $fh pack("x[$size]");
 close $fh;
 
-command_checks_all([ 'pg_controldata', $node->data_dir ],
-                                  0,
-                                  [ qr/WARNING: Calculated CRC checksum does not match value stored in file/,
-                                        qr/WARNING: invalid WAL segment size/ ],
-                                  [ qr/^$/ ],
-                                  'pg_controldata with corrupted pg_control');
+command_checks_all(
+       [ 'pg_controldata', $node->data_dir ],
+       0,
+       [
+qr/WARNING: Calculated CRC checksum does not match value stored in file/,
+               qr/WARNING: invalid WAL segment size/ ],
+       [qr/^$/],
+       'pg_controldata with corrupted pg_control');
index 2f9dfa7b81ba6229fb48723f46e82b1727ef721c..5bbb7997c3bcf9e39ddaabf9060fef1fd30d340e 100644 (file)
@@ -63,14 +63,14 @@ command_fails([ 'pg_ctl', 'stop', '-D', "$tempdir/data" ],
 # Windows but we still want to do the restart test.
 my $logFileName = "$tempdir/data/perm-test-600.log";
 
-command_ok(
-       [ 'pg_ctl', 'restart', '-D', "$tempdir/data", '-l', $logFileName ],
+command_ok([ 'pg_ctl', 'restart', '-D', "$tempdir/data", '-l', $logFileName ],
        'pg_ctl restart with server not running');
 
 # Permissions on log file should be default
 SKIP:
 {
-       skip "unix-style permissions not supported on Windows", 2 if ($windows_os);
+       skip "unix-style permissions not supported on Windows", 2
+         if ($windows_os);
 
        ok(-f $logFileName);
        ok(check_mode_recursive("$tempdir/data", 0700, 0600));
index 25852b903c057d41cea7804a19b068b7e04127dc..5202226f0827bad3953828b00e5fbc23b213e577 100644 (file)
@@ -301,28 +301,26 @@ my %pgdump_runs = (
 
 # Tests which target the 'dump_test' schema, specifically.
 my %dump_test_schema_runs = (
-       only_dump_test_schema => 1,
-       test_schema_plus_blobs => 1,
-);
+       only_dump_test_schema  => 1,
+       test_schema_plus_blobs => 1,);
 
 # Tests which are considered 'full' dumps by pg_dump, but there
 # are flags used to exclude specific items (ACLs, blobs, etc).
 my %full_runs = (
-       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_dump_test_schema => 1,
-       exclude_test_table => 1,
-       exclude_test_table_data => 1,
-       no_blobs => 1,
-       no_owner => 1,
-       no_privs => 1,
-       pg_dumpall_dbprivs => 1,
-       schema_only => 1,
-       with_oids => 1,
-);
+       exclude_test_table       => 1,
+       exclude_test_table_data  => 1,
+       no_blobs                 => 1,
+       no_owner                 => 1,
+       no_privs                 => 1,
+       pg_dumpall_dbprivs       => 1,
+       schema_only              => 1,
+       with_oids                => 1,);
 
 # This is where the actual tests are defined.
 my %tests = (
@@ -336,13 +334,11 @@ my %tests = (
                        \QFOR ROLE regress_dump_test_role IN SCHEMA dump_test \E
                        \QGRANT SELECT ON TABLES  TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data       => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'ALTER DEFAULT PRIVILEGES FOR ROLE regress_dump_test_role REVOKE' => {
                create_order => 55,
@@ -354,11 +350,8 @@ my %tests = (
                        \QFOR ROLE regress_dump_test_role \E
                        \QREVOKE ALL ON FUNCTIONS  FROM PUBLIC;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_post_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'ALTER DEFAULT PRIVILEGES FOR ROLE regress_dump_test_role REVOKE SELECT'
          => {
@@ -374,14 +367,11 @@ my %tests = (
                        \QFOR ROLE regress_dump_test_role \E
                        \QGRANT INSERT,REFERENCES,DELETE,TRIGGER,TRUNCATE,UPDATE ON TABLES  TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_post_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'ALTER ROLE regress_dump_test_role' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QALTER ROLE regress_dump_test_role WITH \E
                        \QNOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN \E
                        \QNOREPLICATION NOBYPASSRLS;\E
@@ -394,54 +384,40 @@ my %tests = (
        'ALTER COLLATION test0 OWNER TO' => {
                regexp    => qr/^ALTER COLLATION public.test0 OWNER TO .*;/m,
                collation => 1,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       %dump_test_schema_runs,
-                       no_owner => 1, }, },
+               like      => { %full_runs, section_pre_data => 1, },
+               unlike    => { %dump_test_schema_runs, no_owner => 1, }, },
 
        'ALTER FOREIGN DATA WRAPPER dummy OWNER TO' => {
-               regexp    => qr/^ALTER FOREIGN DATA WRAPPER dummy OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+               regexp => qr/^ALTER FOREIGN DATA WRAPPER dummy OWNER TO .*;/m,
+               like   => { %full_runs, section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER SERVER s1 OWNER TO' => {
-               regexp    => qr/^ALTER SERVER s1 OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+               regexp => qr/^ALTER SERVER s1 OWNER TO .*;/m,
+               like   => { %full_runs, section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER FUNCTION dump_test.pltestlang_call_handler() OWNER TO' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QALTER FUNCTION dump_test.pltestlang_call_handler() \E
                        \QOWNER TO \E
                        .*;/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER OPERATOR FAMILY dump_test.op_family OWNER TO' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QALTER OPERATOR FAMILY dump_test.op_family USING btree \E
                        \QOWNER TO \E
                        .*;/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER OPERATOR FAMILY dump_test.op_family USING btree' => {
                create_order => 75,
@@ -464,109 +440,95 @@ my %tests = (
                        \QFUNCTION 1 (integer, integer) btint4cmp(integer,integer) ,\E\n\s+
                        \QFUNCTION 2 (integer, integer) btint4sortsupport(internal);\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'ALTER OPERATOR CLASS dump_test.op_class OWNER TO' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QALTER OPERATOR CLASS dump_test.op_class USING btree \E
                        \QOWNER TO \E
                        .*;/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER PUBLICATION pub1 OWNER TO' => {
-               regexp   => qr/^ALTER PUBLICATION pub1 OWNER TO .*;/m,
-               like     => {
-                       %full_runs,
-                       section_post_data        => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+               regexp => qr/^ALTER PUBLICATION pub1 OWNER TO .*;/m,
+               like   => { %full_runs, section_post_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER LARGE OBJECT ... OWNER TO' => {
-               regexp   => qr/^ALTER LARGE OBJECT \d+ OWNER TO .*;/m,
-               like     => {
+               regexp => qr/^ALTER LARGE OBJECT \d+ OWNER TO .*;/m,
+               like   => {
                        %full_runs,
-                       column_inserts           => 1,
-                       data_only                => 1,
-                       section_pre_data         => 1,
-                       test_schema_plus_blobs   => 1, },
+                       column_inserts         => 1,
+                       data_only              => 1,
+                       section_pre_data       => 1,
+                       test_schema_plus_blobs => 1, },
                unlike => {
-                       no_blobs => 1,
-                       no_owner => 1,
+                       no_blobs    => 1,
+                       no_owner    => 1,
                        schema_only => 1, }, },
 
        'ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO' => {
-               regexp    => qr/^ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+               regexp => qr/^ALTER PROCEDURAL LANGUAGE pltestlang OWNER TO .*;/m,
+               like   => { %full_runs, section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER SCHEMA dump_test OWNER TO' => {
-               regexp    => qr/^ALTER SCHEMA dump_test OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               regexp => qr/^ALTER SCHEMA dump_test OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER SCHEMA dump_test_second_schema OWNER TO' => {
-               regexp    => qr/^ALTER SCHEMA dump_test_second_schema OWNER TO .*;/m,
-               like      => {
+               regexp => qr/^ALTER SCHEMA dump_test_second_schema OWNER TO .*;/m,
+               like   => {
                        %full_runs,
-                       role => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER SEQUENCE test_table_col1_seq' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QALTER SEQUENCE dump_test.test_table_col1_seq OWNED BY dump_test.test_table.col1;\E
                        /xm,
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER SEQUENCE test_third_table_col1_seq' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QALTER SEQUENCE dump_test_second_schema.test_third_table_col1_seq OWNED BY dump_test_second_schema.test_third_table.col1;\E
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, }, },
 
        'ALTER TABLE ONLY test_table ADD CONSTRAINT ... PRIMARY KEY' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QALTER TABLE ONLY dump_test.test_table\E \n^\s+
                        \QADD CONSTRAINT test_table_pkey PRIMARY KEY (col1);\E
                        /xm,
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE ONLY test_table ALTER COLUMN col1 SET STATISTICS 90' => {
                create_order => 93,
@@ -578,11 +540,11 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE ONLY test_table ALTER COLUMN col2 SET STORAGE' => {
                create_order => 94,
@@ -594,11 +556,11 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE ONLY test_table ALTER COLUMN col3 SET STORAGE' => {
                create_order => 95,
@@ -610,11 +572,11 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE ONLY test_table ALTER COLUMN col4 SET n_distinct' => {
                create_order => 95,
@@ -626,19 +588,19 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
 'ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION measurement_y2006m2'
          => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m2 \E
                        \QFOR VALUES FROM ('2006-02-01') TO ('2006-03-01');\E\n
                        /xm,
-               like   => { binary_upgrade => 1, }, },
+               like => { binary_upgrade => 1, }, },
 
        'ALTER TABLE test_table CLUSTER ON test_table_pkey' => {
                create_order => 96,
@@ -650,126 +612,115 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE test_table DISABLE TRIGGER ALL' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QSET SESSION AUTHORIZATION 'test_superuser';\E\n\n
                        \QALTER TABLE dump_test.test_table DISABLE TRIGGER ALL;\E\n\n
                        \QCOPY dump_test.test_table (col1, col2, col3, col4) FROM stdin;\E
                        \n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.\n\n\n
                        \QALTER TABLE dump_test.test_table ENABLE TRIGGER ALL;\E/xm,
-               like   => { data_only => 1, }, },
+               like => { data_only => 1, }, },
 
        'ALTER FOREIGN TABLE foreign_table ALTER COLUMN c1 OPTIONS' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QALTER FOREIGN TABLE dump_test.foreign_table ALTER COLUMN c1 OPTIONS (\E\n
                        \s+\Qcolumn_name 'col1'\E\n
                        \Q);\E\n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'ALTER TABLE test_table OWNER TO' => {
-               regexp    => qr/^ALTER TABLE dump_test.test_table OWNER TO .*;/m,
-               like      => {
+               regexp => qr/^ALTER TABLE dump_test.test_table OWNER TO .*;/m,
+               like   => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       no_owner => 1, }, },
+                       exclude_test_table       => 1,
+                       no_owner                 => 1, }, },
 
        'ALTER TABLE test_table ENABLE ROW LEVEL SECURITY' => {
                create_order => 23,
                create_sql   => 'ALTER TABLE dump_test.test_table
                                           ENABLE ROW LEVEL SECURITY;',
-               regexp => qr/^ALTER TABLE dump_test.test_table ENABLE ROW LEVEL SECURITY;/m,
-               like   => {
+               regexp =>
+                 qr/^ALTER TABLE dump_test.test_table ENABLE ROW LEVEL SECURITY;/m,
+               like => {
                        %full_runs,
                        %dump_test_schema_runs,
                        only_dump_test_table => 1,
-                       section_post_data       => 1, },
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER TABLE test_second_table OWNER TO' => {
-               regexp    => qr/^ALTER TABLE dump_test.test_second_table OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               regexp => qr/^ALTER TABLE dump_test.test_second_table OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER TABLE test_third_table OWNER TO' => {
-               regexp    => qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m,
-               like      => {
+               regexp =>
+qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m,
+               like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER TABLE measurement OWNER TO' => {
-               regexp    => qr/^ALTER TABLE dump_test.measurement OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               regexp => qr/^ALTER TABLE dump_test.measurement OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER TABLE measurement_y2006m2 OWNER TO' => {
-               regexp    => qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m,
-               like      => {
+               regexp =>
+qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m,
+               like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_owner => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_owner => 1, }, },
 
        'ALTER FOREIGN TABLE foreign_table OWNER TO' => {
-               regexp    => qr/^ALTER FOREIGN TABLE dump_test.foreign_table OWNER TO .*;/m,
-               like      => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               regexp =>
+                 qr/^ALTER FOREIGN TABLE dump_test.foreign_table OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER TEXT SEARCH CONFIGURATION alt_ts_conf1 OWNER TO' => {
                regexp =>
-                 qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_owner => 1, }, },
+                       no_owner                 => 1, }, },
 
        'ALTER TEXT SEARCH DICTIONARY alt_ts_dict1 OWNER TO' => {
                regexp =>
-                 qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
                        only_dump_test_table     => 1,
@@ -783,16 +734,16 @@ my %tests = (
                regexp => qr/^SELECT pg_catalog\.lo_create\('\d+'\);/m,
                like   => {
                        %full_runs,
-                       column_inserts           => 1,
-                       data_only                => 1,
-                       section_pre_data         => 1,
-                       test_schema_plus_blobs   => 1, },
+                       column_inserts         => 1,
+                       data_only              => 1,
+                       section_pre_data       => 1,
+                       test_schema_plus_blobs => 1, },
                unlike => {
                        schema_only => 1,
-                       no_blobs => 1, }, },
+                       no_blobs    => 1, }, },
 
        'BLOB load (using lo_from_bytea)' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QSELECT pg_catalog.lo_open\E \('\d+',\ \d+\);\n
                        \QSELECT pg_catalog.lowrite(0, \E
                        \Q'\x310a320a330a340a350a360a370a380a390a');\E\n
@@ -800,38 +751,41 @@ my %tests = (
                        /xm,
                like => {
                        %full_runs,
-                       column_inserts           => 1,
-                       data_only                => 1,
-                       section_data             => 1,
-                       test_schema_plus_blobs   => 1, },
+                       column_inserts         => 1,
+                       data_only              => 1,
+                       section_data           => 1,
+                       test_schema_plus_blobs => 1, },
                unlike => {
                        binary_upgrade => 1,
-                       no_blobs => 1,
-                       schema_only => 1, }, },
+                       no_blobs       => 1,
+                       schema_only    => 1, }, },
 
        'COMMENT ON DATABASE postgres' => {
-               regexp    => qr/^COMMENT ON DATABASE postgres IS .*;/m,
+               regexp => qr/^COMMENT ON DATABASE postgres IS .*;/m,
+
                # Should appear in the same tests as "CREATE DATABASE postgres"
-               like   => { createdb => 1, }, },
+               like => { createdb => 1, }, },
 
        'COMMENT ON EXTENSION plpgsql' => {
-               regexp    => qr/^COMMENT ON EXTENSION plpgsql IS .*;/m,
+               regexp => qr/^COMMENT ON EXTENSION plpgsql IS .*;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'COMMENT ON TABLE dump_test.test_table' => {
                create_order => 36,
                create_sql   => 'COMMENT ON TABLE dump_test.test_table
                                           IS \'comment on table\';',
-               regexp => qr/^COMMENT ON TABLE dump_test.test_table IS 'comment on table';/m,
-               like   => {
+               regexp =>
+                 qr/^COMMENT ON TABLE dump_test.test_table IS 'comment on table';/m,
+               like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'COMMENT ON COLUMN dump_test.test_table.col1' => {
                create_order => 36,
@@ -843,11 +797,11 @@ my %tests = (
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 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,
@@ -856,12 +810,9 @@ my %tests = (
                regexp => qr/^
                        \QCOMMENT ON COLUMN dump_test.composite.f1 IS 'comment on column of type';\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON COLUMN dump_test.test_second_table.col1' => {
                create_order => 63,
@@ -870,12 +821,9 @@ my %tests = (
                regexp => qr/^
                        \QCOMMENT ON COLUMN dump_test.test_second_table.col1 IS 'comment on column col1';\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON COLUMN dump_test.test_second_table.col2' => {
                create_order => 64,
@@ -884,12 +832,9 @@ my %tests = (
                regexp => qr/^
                        \QCOMMENT ON COLUMN dump_test.test_second_table.col2 IS 'comment on column col2';\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON CONVERSION dump_test.test_conversion' => {
                create_order => 79,
@@ -897,23 +842,18 @@ my %tests = (
                                           IS \'comment on test conversion\';',
                regexp =>
 qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversion';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON COLLATION test0' => {
                create_order => 77,
                create_sql   => 'COMMENT ON COLLATION test0
                                           IS \'comment on test0 collation\';',
                regexp =>
-                 qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m,
+qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m,
                collation => 1,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like      => { %full_runs, section_pre_data => 1, }, },
 
        'COMMENT ON LARGE OBJECT ...' => {
                create_order => 65,
@@ -929,12 +869,12 @@ qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversi
                        /xm,
                like => {
                        %full_runs,
-                       column_inserts           => 1,
-                       data_only                => 1,
-                       section_pre_data         => 1,
-                       test_schema_plus_blobs   => 1, },
+                       column_inserts         => 1,
+                       data_only              => 1,
+                       section_pre_data       => 1,
+                       test_schema_plus_blobs => 1, },
                unlike => {
-                       no_blobs => 1,
+                       no_blobs    => 1,
                        schema_only => 1, }, },
 
        'COMMENT ON PUBLICATION pub1' => {
@@ -943,9 +883,7 @@ qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversi
                                           IS \'comment on publication\';',
                regexp =>
                  qr/^COMMENT ON PUBLICATION pub1 IS 'comment on publication';/m,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'COMMENT ON SUBSCRIPTION sub1' => {
                create_order => 55,
@@ -953,9 +891,7 @@ qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversi
                                           IS \'comment on subscription\';',
                regexp =>
                  qr/^COMMENT ON SUBSCRIPTION sub1 IS 'comment on subscription';/m,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1' => {
                create_order => 84,
@@ -964,12 +900,9 @@ qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversi
                                           IS \'comment on text search configuration\';',
                regexp =>
 qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on text search configuration';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => {
                create_order => 84,
@@ -978,12 +911,9 @@ qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on t
                                           IS \'comment on text search dictionary\';',
                regexp =>
 qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text search dictionary';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1' => {
                create_order => 84,
@@ -991,12 +921,9 @@ qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text
                                           IS \'comment on text search parser\';',
                regexp =>
 qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text search parser';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => {
                create_order => 84,
@@ -1004,61 +931,49 @@ qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text sear
                                           IS \'comment on text search template\';',
                regexp =>
 qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text search template';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TYPE dump_test.planets - ENUM' => {
                create_order => 68,
                create_sql   => 'COMMENT ON TYPE dump_test.planets
                                           IS \'comment on enum type\';',
-               regexp => qr/^COMMENT ON TYPE dump_test.planets IS 'comment on enum type';/m,
-               like   => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               regexp =>
+                 qr/^COMMENT ON TYPE dump_test.planets IS 'comment on enum type';/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TYPE dump_test.textrange - RANGE' => {
                create_order => 69,
                create_sql   => 'COMMENT ON TYPE dump_test.textrange
                                           IS \'comment on range type\';',
-               regexp => qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m,
-               like   => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               regexp =>
+qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TYPE dump_test.int42 - Regular' => {
                create_order => 70,
                create_sql   => 'COMMENT ON TYPE dump_test.int42
                                           IS \'comment on regular type\';',
-               regexp => qr/^COMMENT ON TYPE dump_test.int42 IS 'comment on regular type';/m,
-               like   => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               regexp =>
+                 qr/^COMMENT ON TYPE dump_test.int42 IS 'comment on regular type';/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COMMENT ON TYPE dump_test.undefined - Undefined' => {
                create_order => 71,
                create_sql   => 'COMMENT ON TYPE dump_test.undefined
                                           IS \'comment on undefined type\';',
                regexp =>
-                 qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'COPY test_table' => {
                create_order => 4,
@@ -1071,15 +986,15 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       data_only              => 1,
-                       only_dump_test_table   => 1,
-                       section_data           => 1, },
+                       data_only            => 1,
+                       only_dump_test_table => 1,
+                       section_data         => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       exclude_test_table_data => 1,
-                       schema_only => 1, }, },
+                       exclude_test_table       => 1,
+                       exclude_test_table_data  => 1,
+                       schema_only              => 1, }, },
 
        'COPY fk_reference_test_table' => {
                create_order => 22,
@@ -1097,21 +1012,21 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                        exclude_test_table_data => 1,
                        section_data            => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        # In a data-only dump, we try to actually order according to FKs,
        # so this check is just making sure that the referring table comes after
        # the referred-to table.
        'COPY fk_reference_test_table second' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QCOPY dump_test.test_table (col1, col2, col3, col4) FROM stdin;\E
                        \n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.\n.*
                        \QCOPY dump_test.fk_reference_test_table (col1) FROM stdin;\E
                        \n(?:\d\n){5}\\\.\n
                        /xms,
-               like   => { data_only => 1, }, },
+               like => { data_only => 1, }, },
 
        'COPY test_second_table' => {
                create_order => 7,
@@ -1125,12 +1040,12 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       data_only               => 1,
-                       section_data            => 1, },
+                       data_only    => 1,
+                       section_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        'COPY test_third_table' => {
                create_order => 12,
@@ -1143,21 +1058,21 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                        /xm,
                like => {
                        %full_runs,
-                       data_only                => 1,
-                       role                     => 1,
-                       section_data             => 1, },
+                       data_only    => 1,
+                       role         => 1,
+                       section_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade          => 1,
                        exclude_test_table_data => 1,
-                       schema_only => 1,
-                       with_oids => 1, }, },
+                       schema_only             => 1,
+                       with_oids               => 1, }, },
 
        'COPY test_third_table WITH OIDS' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QCOPY dump_test_second_schema.test_third_table (col1) WITH OIDS FROM stdin;\E
                        \n(?:\d+\t\d\n){9}\\\.\n
                        /xm,
-               like   => { with_oids => 1, }, },
+               like => { with_oids => 1, }, },
 
        'COPY test_fourth_table' => {
                create_order => 7,
@@ -1170,12 +1085,12 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       data_only               => 1,
-                       section_data            => 1, },
+                       data_only    => 1,
+                       section_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        'COPY test_fifth_table' => {
                create_order => 54,
@@ -1188,12 +1103,12 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       data_only               => 1,
-                       section_data            => 1, },
+                       data_only    => 1,
+                       section_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        'COPY test_table_identity' => {
                create_order => 54,
@@ -1206,44 +1121,45 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       data_only               => 1,
-                       section_data            => 1, },
+                       data_only    => 1,
+                       section_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        'INSERT INTO test_table' => {
-               regexp    => qr/^
+               regexp => qr/^
                        (?:INSERT\ INTO\ dump_test.test_table\ \(col1,\ col2,\ col3,\ col4\)\ VALUES\ \(\d,\ NULL,\ NULL,\ NULL\);\n){9}
                        /xm,
-               like   => { column_inserts => 1, }, },
+               like => { column_inserts => 1, }, },
 
        'INSERT INTO test_second_table' => {
-               regexp    => qr/^
+               regexp => qr/^
                        (?:INSERT\ INTO\ dump_test.test_second_table\ \(col1,\ col2\)
                           \ VALUES\ \(\d,\ '\d'\);\n){9}/xm,
-               like   => { column_inserts => 1, }, },
+               like => { column_inserts => 1, }, },
 
        'INSERT INTO test_third_table' => {
-               regexp    => qr/^
+               regexp => qr/^
                        (?:INSERT\ INTO\ dump_test_second_schema.test_third_table\ \(col1\)
                           \ VALUES\ \(\d\);\n){9}/xm,
-               like   => { column_inserts => 1, }, },
+               like => { column_inserts => 1, }, },
 
        'INSERT INTO test_fourth_table' => {
-               regexp    => qr/^\QINSERT INTO dump_test.test_fourth_table DEFAULT VALUES;\E/m,
-               like      => { column_inserts => 1, }, },
+               regexp =>
+                 qr/^\QINSERT INTO dump_test.test_fourth_table DEFAULT VALUES;\E/m,
+               like => { column_inserts => 1, }, },
 
        'INSERT INTO test_fifth_table' => {
                regexp =>
 qr/^\QINSERT INTO dump_test.test_fifth_table (col1, col2, col3, col4, col5) VALUES (NULL, true, false, B'11001', 'NaN');\E/m,
-               like   => { column_inserts => 1, }, },
+               like => { column_inserts => 1, }, },
 
        'INSERT INTO test_table_identity' => {
                regexp =>
 qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUES (1, 'test');\E/m,
-               like   => { column_inserts => 1, }, },
+               like => { column_inserts => 1, }, },
 
        'CREATE ROLE regress_dump_test_role' => {
                create_order => 1,
@@ -1260,9 +1176,7 @@ qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM V
                  'CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;',
                regexp =>
                  qr/CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;/m,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE COLLATION test0 FROM "C"' => {
                create_order => 76,
@@ -1270,9 +1184,7 @@ qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM V
                regexp       => qr/^
                  \QCREATE COLLATION public.test0 (provider = libc, locale = 'C');\E/xm,
                collation => 1,
-               like      => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like      => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE CAST FOR timestamptz' => {
                create_order => 51,
@@ -1280,15 +1192,13 @@ qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM V
 'CREATE CAST (timestamptz AS interval) WITH FUNCTION age(timestamptz) AS ASSIGNMENT;',
                regexp =>
 qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog\.age\(timestamp with time zone\) AS ASSIGNMENT;/m,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE DATABASE postgres' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QCREATE DATABASE postgres WITH TEMPLATE = template0 \E
                        .*;/xm,
-               like   => { createdb => 1, }, },
+               like => { createdb => 1, }, },
 
        'CREATE DATABASE dump_test' => {
                create_order => 47,
@@ -1296,12 +1206,13 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
                regexp       => qr/^
                        \QCREATE DATABASE dump_test WITH TEMPLATE = template0 \E
                        .*;/xm,
-               like   => { pg_dumpall_dbprivs => 1, }, },
+               like => { pg_dumpall_dbprivs => 1, }, },
 
        'CREATE EXTENSION ... plpgsql' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QCREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\E
                        /xm,
+
                # this shouldn't ever get emitted anymore
                like => {}, },
 
@@ -1326,10 +1237,9 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       exclude_test_table      => 1,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+                       exclude_test_table => 1,
+                       section_pre_data   => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE CONVERSION dump_test.test_conversion' => {
                create_order => 78,
@@ -1337,12 +1247,9 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
 'CREATE DEFAULT CONVERSION dump_test.test_conversion FOR \'LATIN1\' TO \'UTF8\' FROM iso8859_1_to_utf8;',
                regexp =>
 qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;\E/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE DOMAIN dump_test.us_postal_code' => {
                create_order => 29,
@@ -1358,12 +1265,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \$\Q'::text) OR (VALUE ~ '^\d{5}-\d{4}\E\$
                        \Q'::text)));\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE FUNCTION dump_test.pltestlang_call_handler' => {
                create_order => 17,
@@ -1377,12 +1281,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+AS\ \'\$
                        \Qlibdir\/plpgsql', 'plpgsql_call_handler';\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE FUNCTION dump_test.trigger_func' => {
                create_order => 30,
@@ -1395,12 +1296,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+AS\ \$\$
                        \Q BEGIN RETURN NULL; END;\E
                        \$\$;/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE FUNCTION dump_test.event_trigger_func' => {
                create_order => 32,
@@ -1413,12 +1311,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+AS\ \$\$
                        \Q BEGIN RETURN; END;\E
                        \$\$;/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE OPERATOR FAMILY dump_test.op_family' => {
                create_order => 73,
@@ -1427,12 +1322,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                regexp => qr/^
                        \QCREATE OPERATOR FAMILY dump_test.op_family USING btree;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE OPERATOR CLASS dump_test.op_class' => {
                create_order => 74,
@@ -1457,12 +1349,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \QFUNCTION 1 (bigint, bigint) btint8cmp(bigint,bigint) ,\E\n\s+
                        \QFUNCTION 2 (bigint, bigint) btint8sortsupport(internal);\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE EVENT TRIGGER test_event_trigger' => {
                create_order => 33,
@@ -1474,9 +1363,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \QON ddl_command_start\E
                        \n\s+\QEXECUTE PROCEDURE dump_test.event_trigger_func();\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'CREATE TRIGGER test_trigger' => {
                create_order => 31,
@@ -1492,10 +1379,10 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
-                       exclude_test_table => 1,
+                       exclude_test_table       => 1,
                        exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.planets AS ENUM' => {
@@ -1508,16 +1395,14 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+'earth',
                        \n\s+'mars'
                        \n\);/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.planets AS ENUM pg_upgrade' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QCREATE TYPE dump_test.planets AS ENUM (\E
                        \n\);.*^
                        \QALTER TYPE dump_test.planets ADD VALUE 'venus';\E
@@ -1526,7 +1411,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n.*^
                        \QALTER TYPE dump_test.planets ADD VALUE 'mars';\E
                        \n/xms,
-               like   => { binary_upgrade => 1, }, },
+               like => { binary_upgrade => 1, }, },
 
        'CREATE TYPE dump_test.textrange AS RANGE' => {
                create_order => 38,
@@ -1537,23 +1422,17 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\Qsubtype = text,\E
                        \n\s+\Qcollation = pg_catalog."C"\E
                        \n\);/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.int42' => {
                create_order => 39,
                create_sql   => 'CREATE TYPE dump_test.int42;',
                regexp       => qr/^CREATE TYPE dump_test.int42;/m,
-               like         => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1' => {
                create_order => 80,
@@ -1562,15 +1441,12 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                regexp => qr/^
                        \QCREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 (\E\n
                        \s+\QPARSER = pg_catalog."default" );\E/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 ...' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
                        \s+\QADD MAPPING FOR asciiword WITH english_stem;\E\n
                        \n
@@ -1629,12 +1505,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \s+\QADD MAPPING FOR uint WITH simple;\E\n
                        \n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => {
                create_order => 81,
@@ -1643,12 +1516,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                regexp => qr/^
                        \QCREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 (\E\n
                        \s+\QLEXIZE = dsimple_lexize );\E/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TEXT SEARCH PARSER dump_test.alt_ts_prs1' => {
                create_order => 82,
@@ -1661,12 +1531,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \s+\QEND = prsd_end,\E\n
                        \s+\QLEXTYPES = prsd_lextype );\E\n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => {
                create_order => 83,
@@ -1676,12 +1543,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \QCREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (\E\n
                        \s+\QTEMPLATE = pg_catalog.simple );\E\n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE FUNCTION dump_test.int42_in' => {
                create_order => 40,
@@ -1693,12 +1557,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
                        \n\s+AS\ \$\$int4in\$\$;
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE FUNCTION dump_test.int42_out' => {
                create_order => 41,
@@ -1710,12 +1571,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
                        \n\s+AS\ \$\$int4out\$\$;
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE PROCEDURE dump_test.ptest1' => {
                create_order => 41,
@@ -1726,12 +1584,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\QLANGUAGE sql\E
                        \n\s+AS\ \$\$\Q INSERT INTO dump_test.test_table (col1) VALUES (a) \E\$\$;
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.int42 populated' => {
                create_order => 42,
@@ -1752,12 +1607,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\QSTORAGE = plain,\E
                        \n\s+PASSEDBYVALUE\n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.composite' => {
                create_order => 43,
@@ -1771,39 +1623,29 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \n\s+\Qf2 dump_test.int42\E
                        \n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TYPE dump_test.undefined' => {
                create_order => 39,
                create_sql   => 'CREATE TYPE dump_test.undefined;',
                regexp       => qr/^CREATE TYPE dump_test.undefined;/m,
-               like         => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 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         => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like         => { %full_runs, section_pre_data => 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         => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like         => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE FOREIGN TABLE dump_test.foreign_table SERVER s1' => {
                create_order => 88,
@@ -1819,12 +1661,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                        \s+\Qschema_name 'x1'\E\n
                        \Q);\E\n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE USER MAPPING FOR regress_dump_test_role SERVER s1' => {
                create_order => 86,
@@ -1832,9 +1671,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
                  'CREATE USER MAPPING FOR regress_dump_test_role SERVER s1;',
                regexp =>
                  qr/CREATE USER MAPPING FOR regress_dump_test_role SERVER s1;/m,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE TRANSFORM FOR int' => {
                create_order => 34,
@@ -1842,9 +1679,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8'
 'CREATE TRANSFORM FOR int LANGUAGE SQL (FROM SQL WITH FUNCTION varchar_transform(internal), TO SQL WITH FUNCTION int4recv(internal));',
                regexp =>
 qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog\.varchar_transform\(internal\), TO SQL WITH FUNCTION pg_catalog\.int4recv\(internal\)\);/m,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, }, },
+               like => { %full_runs, section_pre_data => 1, }, },
 
        'CREATE LANGUAGE pltestlang' => {
                create_order => 18,
@@ -1853,12 +1688,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QCREATE PROCEDURAL LANGUAGE pltestlang \E
                        \QHANDLER dump_test.pltestlang_call_handler;\E
-                       /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+                       /xm,
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE MATERIALIZED VIEW matview' => {
                create_order => 20,
@@ -1870,12 +1702,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\QFROM dump_test.test_table\E
                        \n\s+\QWITH NO DATA;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE MATERIALIZED VIEW matview_second' => {
                create_order => 21,
@@ -1888,12 +1717,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\QFROM dump_test.matview\E
                        \n\s+\QWITH NO DATA;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE MATERIALIZED VIEW matview_third' => {
                create_order => 58,
@@ -1906,12 +1732,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\QFROM dump_test.matview_second\E
                        \n\s+\QWITH NO DATA;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE MATERIALIZED VIEW matview_fourth' => {
                create_order => 59,
@@ -1924,12 +1747,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\QFROM dump_test.matview_third\E
                        \n\s+\QWITH NO DATA;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE POLICY p1 ON test_table' => {
                create_order => 22,
@@ -1943,11 +1763,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE POLICY p2 ON test_table FOR SELECT' => {
                create_order => 24,
@@ -1960,11 +1780,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE POLICY p3 ON test_table FOR INSERT' => {
                create_order => 25,
@@ -1977,11 +1797,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE POLICY p4 ON test_table FOR UPDATE' => {
                create_order => 26,
@@ -1994,11 +1814,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE POLICY p5 ON test_table FOR DELETE' => {
                create_order => 27,
@@ -2011,11 +1831,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE POLICY p6 ON test_table AS RESTRICTIVE' => {
                create_order => 27,
@@ -2028,11 +1848,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_post_data       => 1, },
+                       only_dump_test_table => 1,
+                       section_post_data    => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE PUBLICATION pub1' => {
                create_order => 50,
@@ -2040,9 +1860,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp       => qr/^
                        \QCREATE PUBLICATION pub1 WITH (publish = 'insert, update, delete, truncate');\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'CREATE PUBLICATION pub2' => {
                create_order => 50,
@@ -2052,9 +1870,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QCREATE PUBLICATION pub2 FOR ALL TABLES WITH (publish = '');\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'CREATE SUBSCRIPTION sub1' => {
                create_order => 50,
@@ -2064,9 +1880,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QCREATE SUBSCRIPTION sub1 CONNECTION 'dbname=doesnotexist' PUBLICATION pub1 WITH (connect = false, slot_name = 'sub1');\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data        => 1, }, },
+               like => { %full_runs, section_post_data => 1, }, },
 
        'ALTER PUBLICATION pub1 ADD TABLE test_table' => {
                create_order => 51,
@@ -2075,12 +1889,10 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_table;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data       => 1, },
+               like   => { %full_runs, section_post_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'ALTER PUBLICATION pub1 ADD TABLE test_second_table' => {
                create_order => 52,
@@ -2089,27 +1901,22 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_post_data       => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like => { %full_runs, section_post_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE SCHEMA public' => {
-               regexp    => qr/^CREATE SCHEMA public;/m,
+               regexp => qr/^CREATE SCHEMA public;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'CREATE SCHEMA dump_test' => {
                create_order => 2,
                create_sql   => 'CREATE SCHEMA dump_test;',
                regexp       => qr/^CREATE SCHEMA dump_test;/m,
-               like         => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE SCHEMA dump_test_second_schema' => {
                create_order => 9,
@@ -2117,8 +1924,8 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp       => qr/^CREATE SCHEMA dump_test_second_schema;/m,
                like         => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, }, },
 
        'CREATE TABLE test_table' => {
                create_order => 3,
@@ -2141,11 +1948,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1, }, },
+                       exclude_test_table       => 1, }, },
 
        'CREATE TABLE fk_reference_test_table' => {
                create_order => 21,
@@ -2157,12 +1964,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\Qcol1 integer NOT NULL\E
                        \n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TABLE test_second_table' => {
                create_order => 6,
@@ -2176,12 +1980,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\Qcol2 text\E
                        \n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE UNLOGGED TABLE test_third_table WITH OIDS' => {
                create_order => 11,
@@ -2201,9 +2002,10 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
+                       role             => 1,
+                       section_pre_data => 1, },
                unlike => {
+
                        # FIXME figure out why/how binary upgrade drops OIDs.
                        binary_upgrade => 1, }, },
 
@@ -2226,12 +2028,10 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \)\n
                        \QPARTITION BY RANGE (logdate);\E\n
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1, }, },
 
        'CREATE TABLE measurement_y2006m2 PARTITION OF' => {
@@ -2248,10 +2048,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       binary_upgrade => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { binary_upgrade => 1, }, },
 
        'CREATE TABLE test_fourth_table_zero_col' => {
                create_order => 6,
@@ -2261,12 +2060,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \QCREATE TABLE dump_test.test_fourth_table (\E
                        \n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TABLE test_fifth_table' => {
                create_order => 53,
@@ -2286,12 +2082,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\Qcol5 double precision\E
                        \n\);
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE TABLE test_table_identity' => {
                create_order => 3,
@@ -2314,12 +2107,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \s+\QCACHE 1\E\n
                        \);
                        /xms,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE STATISTICS extended_stats_no_options' => {
                create_order => 97,
@@ -2328,12 +2118,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QCREATE STATISTICS dump_test.test_ext_stats_no_options ON col1, col2 FROM dump_test.test_fifth_table;\E
                    /xms,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data       => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE STATISTICS extended_stats_options' => {
                create_order => 97,
@@ -2342,15 +2129,12 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QCREATE STATISTICS dump_test.test_ext_stats_opts (ndistinct) ON col1, col2 FROM dump_test.test_fifth_table;\E
                    /xms,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data       => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE SEQUENCE test_table_col1_seq' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QCREATE SEQUENCE dump_test.test_table_col1_seq\E
                        \n\s+\QAS integer\E
                        \n\s+\QSTART WITH 1\E
@@ -2362,13 +2146,12 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE SEQUENCE test_third_table_col1_seq' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QCREATE SEQUENCE dump_test_second_schema.test_third_table_col1_seq\E
                        \n\s+\QAS integer\E
                        \n\s+\QSTART WITH 1\E
@@ -2379,8 +2162,8 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, }, },
 
        'CREATE UNIQUE INDEX test_third_table_idx ON test_third_table' => {
                create_order => 13,
@@ -2392,32 +2175,33 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_post_data        => 1, }, },
+                       role              => 1,
+                       section_post_data => 1, }, },
 
        'CREATE INDEX ON ONLY measurement' => {
                create_order => 92,
-               create_sql   => 'CREATE INDEX ON dump_test.measurement (city_id, logdate);',
+               create_sql =>
+                 'CREATE INDEX ON dump_test.measurement (city_id, logdate);',
                regexp => qr/^
                \QCREATE INDEX measurement_city_id_logdate_idx ON ONLY dump_test.measurement USING\E
                /xm,
                like => {
-                       binary_upgrade           => 1,
-                       clean                    => 1,
-                       clean_if_exists          => 1,
-                       createdb                 => 1,
-                       defaults                 => 1,
-                       exclude_test_table       => 1,
-                       exclude_test_table_data  => 1,
-                       no_blobs                 => 1,
-                       no_privs                 => 1,
-                       no_owner                 => 1,
-                       only_dump_test_schema    => 1,
-                       pg_dumpall_dbprivs       => 1,
-                       schema_only              => 1,
-                       section_post_data        => 1,
-                       test_schema_plus_blobs   => 1,
-                       with_oids                => 1, },
+                       binary_upgrade          => 1,
+                       clean                   => 1,
+                       clean_if_exists         => 1,
+                       createdb                => 1,
+                       defaults                => 1,
+                       exclude_test_table      => 1,
+                       exclude_test_table_data => 1,
+                       no_blobs                => 1,
+                       no_privs                => 1,
+                       no_owner                => 1,
+                       only_dump_test_schema   => 1,
+                       pg_dumpall_dbprivs      => 1,
+                       schema_only             => 1,
+                       section_post_data       => 1,
+                       test_schema_plus_blobs  => 1,
+                       with_oids               => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
                        only_dump_test_table     => 1,
@@ -2430,40 +2214,38 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                all_runs     => 1,
                catch_all    => 'CREATE ... commands',
                create_order => 93,
-               create_sql   => 'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);',
+               create_sql =>
+'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);',
                regexp => qr/^
                        \QALTER TABLE ONLY dump_test.measurement\E \n^\s+
                        \QADD CONSTRAINT measurement_pkey PRIMARY KEY (city_id, logdate);\E
                /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'CREATE INDEX ... ON measurement_y2006_m2' => {
-               regexp       => qr/^
+               regexp => qr/^
                \QCREATE INDEX measurement_y2006m2_city_id_logdate_idx ON dump_test_second_schema.measurement_y2006m2 \E
                /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_post_data        => 1, }, },
+                       role              => 1,
+                       section_post_data => 1, }, },
 
        'ALTER INDEX ... ATTACH PARTITION' => {
-               regexp       => qr/^
+               regexp => qr/^
                \QALTER INDEX dump_test.measurement_city_id_logdate_idx ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_city_id_logdate_idx\E
                /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_post_data        => 1, }, },
+                       role              => 1,
+                       section_post_data => 1, }, },
 
        'ALTER INDEX ... ATTACH PARTITION (primary key)' => {
-               all_runs     => 1,
-               catch_all    => 'CREATE ... commands',
-               regexp       => qr/^
+               all_runs  => 1,
+               catch_all => 'CREATE ... commands',
+               regexp    => qr/^
                \QALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_pkey\E
                /xm,
                like => {
@@ -2501,12 +2283,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        \n\s+\QSELECT test_table.col1\E
                        \n\s+\QFROM dump_test.test_table\E
                        \n\s+\QWITH LOCAL CHECK OPTION;\E/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        'ALTER VIEW test_view SET DEFAULT' => {
                create_order => 62,
@@ -2514,12 +2293,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                  'ALTER VIEW dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;',
                regexp => qr/^
                        \QALTER TABLE ONLY dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;\E/xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
-               unlike => {
-                       exclude_dump_test_schema => 1, }, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
+               unlike => { exclude_dump_test_schema => 1, }, },
 
        # FIXME
        'DROP SCHEMA public (for testing without public schema)' => {
@@ -2530,101 +2306,106 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                like         => {}, },
 
        'DROP SCHEMA public' => {
-               regexp    => qr/^DROP SCHEMA public;/m,
+               regexp => qr/^DROP SCHEMA public;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'DROP SCHEMA IF EXISTS public' => {
-               regexp    => qr/^DROP SCHEMA IF EXISTS public;/m,
+               regexp => qr/^DROP SCHEMA IF EXISTS public;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'DROP EXTENSION plpgsql' => {
-               regexp    => qr/^DROP EXTENSION plpgsql;/m,
+               regexp => qr/^DROP EXTENSION plpgsql;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'DROP FUNCTION dump_test.pltestlang_call_handler()' => {
                regexp => qr/^DROP FUNCTION dump_test\.pltestlang_call_handler\(\);/m,
                like   => { clean => 1, }, },
 
        'DROP LANGUAGE pltestlang' => {
-               regexp    => qr/^DROP PROCEDURAL LANGUAGE pltestlang;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP PROCEDURAL LANGUAGE pltestlang;/m,
+               like   => { clean => 1, }, },
 
        'DROP SCHEMA dump_test' => {
-               regexp    => qr/^DROP SCHEMA dump_test;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP SCHEMA dump_test;/m,
+               like   => { clean => 1, }, },
 
        'DROP SCHEMA dump_test_second_schema' => {
-               regexp    => qr/^DROP SCHEMA dump_test_second_schema;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP SCHEMA dump_test_second_schema;/m,
+               like   => { clean => 1, }, },
 
        'DROP TABLE test_table' => {
-               regexp    => qr/^DROP TABLE dump_test\.test_table;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP TABLE dump_test\.test_table;/m,
+               like   => { clean => 1, }, },
 
        'DROP TABLE fk_reference_test_table' => {
-               regexp    => qr/^DROP TABLE dump_test\.fk_reference_test_table;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP TABLE dump_test\.fk_reference_test_table;/m,
+               like   => { clean => 1, }, },
 
        'DROP TABLE test_second_table' => {
-               regexp    => qr/^DROP TABLE dump_test\.test_second_table;/m,
-               like      => { clean => 1, }, },
+               regexp => qr/^DROP TABLE dump_test\.test_second_table;/m,
+               like   => { clean => 1, }, },
 
        'DROP TABLE test_third_table' => {
                regexp => qr/^DROP TABLE dump_test_second_schema\.test_third_table;/m,
                like   => { clean => 1, }, },
 
        'DROP EXTENSION IF EXISTS plpgsql' => {
-               regexp    => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,
+               regexp => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,
+
                # this shouldn't ever get emitted anymore
-               like      => {}, },
+               like => {}, },
 
        'DROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler()' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QDROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler();\E
                        /xm,
-               like   => { clean_if_exists => 1, }, },
+               like => { clean_if_exists => 1, }, },
 
        'DROP LANGUAGE IF EXISTS pltestlang' => {
-               regexp    => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
-               like      => { clean_if_exists => 1, }, },
+               regexp => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
+               like   => { clean_if_exists => 1, }, },
 
        'DROP SCHEMA IF EXISTS dump_test' => {
-               regexp    => qr/^DROP SCHEMA IF EXISTS dump_test;/m,
-               like      => { clean_if_exists => 1, }, },
+               regexp => qr/^DROP SCHEMA IF EXISTS dump_test;/m,
+               like   => { clean_if_exists => 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, }, },
+               regexp => qr/^DROP SCHEMA IF EXISTS dump_test_second_schema;/m,
+               like   => { clean_if_exists => 1, }, },
 
        'DROP TABLE IF EXISTS test_table' => {
-               regexp    => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
-               like      => { clean_if_exists => 1, }, },
+               regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
+               like   => { clean_if_exists => 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, }, },
+               regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_second_table;/m,
+               like   => { clean_if_exists => 1, }, },
 
        'DROP TABLE IF EXISTS test_third_table' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QDROP TABLE IF EXISTS dump_test_second_schema.test_third_table;\E
                        /xm,
-               like   => { clean_if_exists => 1, }, },
+               like => { clean_if_exists => 1, }, },
 
        'DROP ROLE regress_dump_test_role' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QDROP ROLE regress_dump_test_role;\E
                        /xm,
-               like   => { pg_dumpall_globals_clean => 1, }, },
+               like => { pg_dumpall_globals_clean => 1, }, },
 
        'DROP ROLE pg_' => {
-               regexp    => qr/^
+               regexp => qr/^
                        \QDROP ROLE pg_\E.*;
                        /xm,
+
                # this shouldn't ever get emitted anywhere
-               like   => {}, },
+               like => {}, },
 
        'GRANT USAGE ON SCHEMA dump_test_second_schema' => {
                create_order => 10,
@@ -2635,10 +2416,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT USAGE ON FOREIGN DATA WRAPPER dummy' => {
                create_order => 85,
@@ -2647,11 +2427,8 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT ALL ON FOREIGN DATA WRAPPER dummy TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT USAGE ON FOREIGN SERVER s1' => {
                create_order => 85,
@@ -2660,11 +2437,8 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT ALL ON FOREIGN SERVER s1 TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT USAGE ON DOMAIN dump_test.us_postal_code' => {
                create_order => 72,
@@ -2673,13 +2447,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT ALL ON TYPE dump_test.us_postal_code TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT USAGE ON TYPE dump_test.int42' => {
                create_order => 87,
@@ -2688,13 +2460,11 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT ALL ON TYPE dump_test.int42 TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT USAGE ON TYPE dump_test.planets - ENUM' => {
                create_order => 66,
@@ -2703,27 +2473,24 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT ALL ON TYPE dump_test.planets TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT USAGE ON TYPE dump_test.textrange - RANGE' => {
                create_order => 67,
-               create_sql => 'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;',
+               create_sql =>
+'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;',
                regexp => qr/^
                        \QGRANT ALL ON TYPE dump_test.textrange TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT CREATE ON DATABASE dump_test' => {
                create_order => 48,
@@ -2732,23 +2499,23 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
                regexp => qr/^
                        \QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E
                        /xm,
-               like   => { pg_dumpall_dbprivs => 1, }, },
+               like => { pg_dumpall_dbprivs => 1, }, },
 
        'GRANT SELECT ON TABLE test_table' => {
                create_order => 5,
                create_sql   => 'GRANT SELECT ON TABLE dump_test.test_table
                                                   TO regress_dump_test_role;',
                regexp =>
-                 qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m,
+qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m,
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table    => 1,
-                       section_pre_data        => 1, },
+                       only_dump_test_table => 1,
+                       section_pre_data     => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       exclude_test_table => 1,
-                       no_privs => 1, }, },
+                       exclude_test_table       => 1,
+                       no_privs                 => 1, }, },
 
        'GRANT SELECT ON TABLE test_third_table' => {
                create_order => 19,
@@ -2759,10 +2526,9 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_dump_test_role;/m,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT ALL ON SEQUENCE test_third_table_col1_seq' => {
                create_order => 28,
@@ -2774,10 +2540,9 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                        /xm,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT SELECT ON TABLE measurement' => {
                create_order => 91,
@@ -2785,27 +2550,25 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                                                   TABLE dump_test.measurement
                                                   TO regress_dump_test_role;',
                regexp =>
-                 qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT SELECT ON TABLE measurement_y2006m2' => {
                create_order => 92,
                create_sql   => 'GRANT SELECT ON
                                                   TABLE dump_test_second_schema.measurement_y2006m2
                                                   TO regress_dump_test_role;',
-               regexp => qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m,
+               regexp =>
+qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m,
                like => {
                        %full_runs,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+                       role             => 1,
+                       section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT ALL ON LARGE OBJECT ...' => {
                create_order => 60,
@@ -2821,15 +2584,15 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                        /xm,
                like => {
                        %full_runs,
-                       column_inserts           => 1,
-                       data_only                => 1,
-                       section_pre_data         => 1,
-                       test_schema_plus_blobs   => 1, },
+                       column_inserts         => 1,
+                       data_only              => 1,
+                       section_pre_data       => 1,
+                       test_schema_plus_blobs => 1, },
                unlike => {
                        binary_upgrade => 1,
-                       no_blobs => 1,
-                       no_privs => 1,
-                       schema_only => 1, }, },
+                       no_blobs       => 1,
+                       no_privs       => 1,
+                       schema_only    => 1, }, },
 
        'GRANT INSERT(col1) ON TABLE test_second_table' => {
                create_order => 8,
@@ -2839,13 +2602,11 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                regexp => qr/^
                        \QGRANT INSERT(col1) ON TABLE dump_test.test_second_table TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_pre_data        => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
                unlike => {
                        exclude_dump_test_schema => 1,
-                       no_privs => 1, }, },
+                       no_privs                 => 1, }, },
 
        'GRANT EXECUTE ON FUNCTION pg_sleep() TO regress_dump_test_role' => {
                create_order => 16,
@@ -2854,11 +2615,8 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                regexp => qr/^
                        \QGRANT ALL ON FUNCTION pg_catalog.pg_sleep(double precision) TO regress_dump_test_role;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT SELECT (proname ...) ON TABLE pg_proc TO public' => {
                create_order => 46,
@@ -2925,59 +2683,53 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                \QGRANT SELECT(probin) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
                \QGRANT SELECT(proconfig) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
                \QGRANT SELECT(proacl) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E/xms,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'GRANT USAGE ON SCHEMA public TO public' => {
                regexp => qr/^
                        \Q--\E\n\n
                        \QGRANT USAGE ON SCHEMA public TO PUBLIC;\E
                        /xm,
+
                # this shouldn't ever get emitted anymore
                like => {}, },
 
        'REFRESH MATERIALIZED VIEW matview' => {
-               regexp   => qr/^REFRESH MATERIALIZED VIEW dump_test.matview;/m,
-               like     => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data       => 1, },
+               regexp => qr/^REFRESH MATERIALIZED VIEW dump_test.matview;/m,
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        'REFRESH MATERIALIZED VIEW matview_second' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QREFRESH MATERIALIZED VIEW dump_test.matview;\E
                        \n.*
                        \QREFRESH MATERIALIZED VIEW dump_test.matview_second;\E
                        /xms,
-               like => {
-                       %full_runs,
-                       %dump_test_schema_runs,
-                       section_post_data       => 1, },
+               like =>
+                 { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
                unlike => {
-                       binary_upgrade => 1,
+                       binary_upgrade           => 1,
                        exclude_dump_test_schema => 1,
-                       schema_only => 1, }, },
+                       schema_only              => 1, }, },
 
        # FIXME
        'REFRESH MATERIALIZED VIEW matview_third' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QREFRESH MATERIALIZED VIEW dump_test.matview_third;\E
                        /xms,
-               like   => {}, },
+               like => {}, },
 
        # FIXME
        'REFRESH MATERIALIZED VIEW matview_fourth' => {
-               regexp   => qr/^
+               regexp => qr/^
                        \QREFRESH MATERIALIZED VIEW dump_test.matview_fourth;\E
                        /xms,
-               like   => {}, },
+               like => {}, },
 
        'REVOKE CONNECT ON DATABASE dump_test FROM public' => {
                create_order => 49,
@@ -2987,7 +2739,7 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                        \QGRANT TEMPORARY ON DATABASE dump_test TO PUBLIC;\E\n
                        \QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E
                        /xm,
-               like   => { pg_dumpall_dbprivs => 1, }, },
+               like => { pg_dumpall_dbprivs => 1, }, },
 
        'REVOKE EXECUTE ON FUNCTION pg_sleep() FROM public' => {
                create_order => 15,
@@ -2996,21 +2748,16 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                regexp => qr/^
                        \QREVOKE ALL ON FUNCTION pg_catalog.pg_sleep(double precision) FROM PUBLIC;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 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_catalog.pg_proc FROM PUBLIC;/m,
-               like         => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               regexp =>
+                 qr/^REVOKE SELECT ON TABLE pg_catalog.pg_proc FROM PUBLIC;/m,
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'REVOKE CREATE ON SCHEMA public FROM public' => {
                create_order => 16,
@@ -3019,11 +2766,8 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                        \QREVOKE ALL ON SCHEMA public FROM PUBLIC;\E
                        \n\QGRANT USAGE ON SCHEMA public TO PUBLIC;\E
                        /xm,
-               like => {
-                       %full_runs,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+               like => { %full_runs, section_pre_data => 1, },
+               unlike => { no_privs => 1, }, },
 
        'REVOKE USAGE ON LANGUAGE plpgsql FROM public' => {
                create_order => 16,
@@ -3032,11 +2776,10 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du
                like         => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table     => 1,
-                       role                     => 1,
-                       section_pre_data         => 1, },
-               unlike => {
-                       no_privs => 1, }, },
+                       only_dump_test_table => 1,
+                       role                 => 1,
+                       section_pre_data     => 1, },
+               unlike => { no_privs => 1, }, },
 
 );
 
@@ -3121,8 +2864,9 @@ foreach my $run (sort keys %pgdump_runs)
                        next;
                }
 
-               # If there is a like entry, but no unlike entry, then we will test the like case
-               if ($tests{$test}->{like}->{$test_key} && !defined($tests{$test}->{unlike}->{$test_key}))
+# If there is a like entry, but no unlike entry, then we will test the like case
+               if ($tests{$test}->{like}->{$test_key}
+                       && !defined($tests{$test}->{unlike}->{$test_key}))
                {
                        $num_tests++;
                }
@@ -3283,19 +3027,19 @@ foreach my $run (sort keys %pgdump_runs)
 
                # Run the test listed as a like, unless it is specifically noted
                # as an unlike (generally due to an explicit exclusion or similar).
-               if ($tests{$test}->{like}->{$test_key} && !defined($tests{$test}->{unlike}->{$test_key}))
+               if ($tests{$test}->{like}->{$test_key}
+                       && !defined($tests{$test}->{unlike}->{$test_key}))
                {
-                       if (!ok($output_file =~ $tests{$test}->{regexp}, "$run: should dump $test"))
+                       if (!ok($output_file =~ $tests{$test}->{regexp},
+                                       "$run: should dump $test"))
                        {
                                diag("Review $run results in $tempdir");
                        }
                }
                else
                {
-                       if (!ok(
-                               $output_file !~
-                               $tests{$test}->{regexp},
-                               "$run: should not dump $test"))
+                       if (!ok($output_file !~ $tests{$test}->{regexp},
+                                       "$run: should not dump $test"))
                        {
                                diag("Review $run results in $tempdir");
                        }
index 0d6ab20073a2c8bca76d917e17bd533472eec7f4..ca93ddbda050ff055d15b16119adb5bbb7657012 100644 (file)
@@ -13,14 +13,14 @@ my $node = get_new_node('main');
 $node->init;
 
 command_like([ 'pg_resetwal', '-n', $node->data_dir ],
-                        qr/checkpoint/,
-                        'pg_resetwal -n produces output');
+       qr/checkpoint/, 'pg_resetwal -n produces output');
 
 
 # Permissions on PGDATA should be default
 SKIP:
 {
-       skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+       skip "unix-style permissions not supported on Windows", 1
+         if ($windows_os);
 
        ok(check_mode_recursive($node->data_dir, 0700, 0600),
                'check PGDATA permissions');
index 9df5574c8bd551cddb2d6bd68581fff1a8244ce3..54bdbfd661bba1bf87230c0813d049e27abd4963 100644 (file)
@@ -11,7 +11,7 @@ my $node = get_new_node('main');
 $node->init;
 
 my $pg_control = $node->data_dir . '/global/pg_control';
-my $size = (stat($pg_control))[7];
+my $size       = (stat($pg_control))[7];
 
 # Read out the head of the file to get PG_CONTROL_VERSION in
 # particular.
@@ -27,11 +27,14 @@ binmode $fh;
 print $fh pack("x[$size]");
 close $fh;
 
-command_checks_all([ 'pg_resetwal', '-n', $node->data_dir ],
-                   0,
-                   [ qr/pg_control version number/ ],
-                   [ qr/pg_resetwal: pg_control exists but is broken or wrong version; ignoring it/ ],
-                   'processes corrupted pg_control all zeroes');
+command_checks_all(
+       [ 'pg_resetwal', '-n', $node->data_dir ],
+       0,
+       [qr/pg_control version number/],
+       [
+qr/pg_resetwal: pg_control exists but is broken or wrong version; ignoring it/
+       ],
+       'processes corrupted pg_control all zeroes');
 
 # Put in the previously saved header data.  This uses a different code
 # path internally, allowing us to process a zero WAL segment size.
@@ -40,8 +43,11 @@ binmode $fh;
 print $fh $data, pack("x[" . ($size - 16) . "]");
 close $fh;
 
-command_checks_all([ 'pg_resetwal', '-n', $node->data_dir ],
-                   0,
-                   [ qr/pg_control version number/ ],
-                   [ qr/\Qpg_resetwal: pg_control specifies invalid WAL segment size (0 bytes); proceed with caution\E/ ],
-                   'processes zero WAL segment size');
+command_checks_all(
+       [ 'pg_resetwal', '-n', $node->data_dir ],
+       0,
+       [qr/pg_control version number/],
+       [
+qr/\Qpg_resetwal: pg_control specifies invalid WAL segment size (0 bytes); proceed with caution\E/
+       ],
+       'processes zero WAL segment size');
index 63d9bd517dfb67153f0ba4dca4109fcb8ebd61cd..278ffd891c1ce0a911c08c847609dae7627ff68f 100644 (file)
@@ -115,16 +115,18 @@ sub check_query
 
 sub setup_cluster
 {
-       my $extra_name = shift;         # Used to differentiate clusters
-       my $extra = shift;                      # Extra params for initdb
+       my $extra_name = shift;    # Used to differentiate clusters
+       my $extra      = shift;    # Extra params for initdb
 
        # Initialize master, data checksums are mandatory
-       $node_master = get_new_node('master' . ($extra_name ? "_${extra_name}" : ''));
-       $node_master->init(
-               allows_streaming => 1, extra => $extra);
+       $node_master =
+         get_new_node('master' . ($extra_name ? "_${extra_name}" : ''));
+       $node_master->init(allows_streaming => 1, extra => $extra);
+
        # Set wal_keep_segments to prevent WAL segment recycling after enforced
        # checkpoints in the tests.
-       $node_master->append_conf('postgresql.conf', qq(
+       $node_master->append_conf(
+               'postgresql.conf', qq(
 wal_keep_segments = 20
 ));
 }
@@ -141,7 +143,8 @@ sub create_standby
 {
        my $extra_name = shift;
 
-       $node_standby = get_new_node('standby' . ($extra_name ? "_${extra_name}" : ''));
+       $node_standby =
+         get_new_node('standby' . ($extra_name ? "_${extra_name}" : ''));
        $node_master->backup('my_backup');
        $node_standby->init_from_backup($node_master, 'my_backup');
        my $connstr_master = $node_master->connstr();
@@ -239,10 +242,11 @@ sub run_pg_rewind
                "$tmp_folder/master-postgresql.conf.tmp",
                "$master_pgdata/postgresql.conf");
 
-       chmod($node_master->group_access() ? 0640 : 0600,
-                 "$master_pgdata/postgresql.conf")
-               or BAIL_OUT(
-                       "unable to set permissions for $master_pgdata/postgresql.conf");
+       chmod(
+               $node_master->group_access() ? 0640 : 0600,
+               "$master_pgdata/postgresql.conf")
+         or BAIL_OUT(
+               "unable to set permissions for $master_pgdata/postgresql.conf");
 
        # Plug-in rewound node to the now-promoted standby node
        my $port_standby = $node_standby->port;
index 1b0f823b0ccb89c2c98f3921b5d51fb21cefa9e6..9a0ce09a779464874c503dfb09baba92fbe03d20 100644 (file)
@@ -87,9 +87,10 @@ in master, before promotion
                'tail-copy');
 
        # Permissions on PGDATA should be default
-       SKIP:
+  SKIP:
        {
-               skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+               skip "unix-style permissions not supported on Windows", 1
+                 if ($windows_os);
 
                ok(check_mode_recursive($node_master->data_dir(), 0700, 0600),
                        'check PGDATA permissions');
index c364965d3ae7d74d410d3c315b093b67f129140f..bef0e173dcaec6729bc8f1797d4bb534ef0e90c5 100644 (file)
@@ -43,9 +43,10 @@ template1
                'database names');
 
        # Permissions on PGDATA should have group permissions
-       SKIP:
+  SKIP:
        {
-               skip "unix-style permissions not supported on Windows", 1 if ($windows_os);
+               skip "unix-style permissions not supported on Windows", 1
+                 if ($windows_os);
 
                ok(check_mode_recursive($node_master->data_dir(), 0750, 0640),
                        'check PGDATA permissions');
index be08b2061137164f5773393da335c6349372af3b..b346d245ac90f3a82e026270a49bba7ba5a5f863 100644 (file)
@@ -81,8 +81,10 @@ pgbench(
 
 # Initialize pgbench tables scale 1
 pgbench(
-       '-i', 0, [qr{^$}],
-       [ qr{creating tables}, qr{vacuuming}, qr{creating primary keys}, qr{done\.} ],
+       '-i', 0,
+       [qr{^$}],
+       [   qr{creating tables},       qr{vacuuming},
+               qr{creating primary keys}, qr{done\.} ],
        'pgbench scale 1 initialization',);
 
 # Again, with all possible options
@@ -100,8 +102,9 @@ pgbench(
 
 # Test interaction of --init-steps with legacy step-selection options
 pgbench(
-       '--initialize --init-steps=dtpvgvv --no-vacuum --foreign-keys --unlogged-tables',
-       0, [qr{^$}],
+'--initialize --init-steps=dtpvgvv --no-vacuum --foreign-keys --unlogged-tables',
+       0,
+       [qr{^$}],
        [   qr{dropping old tables},
                qr{creating tables},
                qr{creating primary keys},
@@ -218,15 +221,16 @@ COMMIT;
 # test expressions
 # command 1..3 and 23 depend on random seed which is used to call srandom.
 pgbench(
-       '--random-seed=5432 -t 1 -Dfoo=-10.1 -Dbla=false -Di=+3 -Dminint=-9223372036854775808 -Dn=null -Dt=t -Df=of -Dd=1.0',
+'--random-seed=5432 -t 1 -Dfoo=-10.1 -Dbla=false -Di=+3 -Dminint=-9223372036854775808 -Dn=null -Dt=t -Df=of -Dd=1.0',
        0,
        [ qr{type: .*/001_pgbench_expressions}, qr{processed: 1/1} ],
        [   qr{setting random seed to 5432\b},
+
                # After explicit seeding, the four * random checks (1-3,20) should be
                # deterministic, but not necessarily portable.
-               qr{command=1.: int 1\d\b}, # uniform random: 12 on linux
-               qr{command=2.: int 1\d\d\b}, # exponential random: 106 on linux
-               qr{command=3.: int 1\d\d\d\b}, # gaussian random: 1462 on linux
+               qr{command=1.: int 1\d\b},        # uniform random: 12 on linux
+               qr{command=2.: int 1\d\d\b},      # exponential random: 106 on linux
+               qr{command=3.: int 1\d\d\d\b},    # gaussian random: 1462 on linux
                qr{command=4.: int 4\b},
                qr{command=5.: int 5\b},
                qr{command=6.: int 6\b},
@@ -240,7 +244,7 @@ pgbench(
                qr{command=16.: double 16\b},
                qr{command=17.: double 17\b},
                qr{command=18.: int 9223372036854775807\b},
-               qr{command=20.: int \d\b}, # zipfian random: 1 on linux
+               qr{command=20.: int \d\b},    # zipfian random: 1 on linux
                qr{command=21.: double -27\b},
                qr{command=22.: double 1024\b},
                qr{command=23.: double 1\b},
@@ -280,9 +284,9 @@ pgbench(
                qr{command=86.: int 86\b},
                qr{command=93.: int 93\b},
                qr{command=95.: int 0\b},
-               qr{command=96.: int 1\b},    # :scale
-               qr{command=97.: int 0\b},    # :client_id
-               qr{command=98.: int 5432\b}, # :random_seed
+               qr{command=96.: int 1\b},       # :scale
+               qr{command=97.: int 0\b},       # :client_id
+               qr{command=98.: int 5432\b},    # :random_seed
        ],
        'pgbench expressions',
        {   '001_pgbench_expressions' => q{-- integer functions
@@ -411,18 +415,20 @@ SELECT :v0, :v1, :v2, :v3;
 
 # random determinism when seeded
 $node->safe_psql('postgres',
-       'CREATE UNLOGGED TABLE seeded_random(seed INT8 NOT NULL, rand TEXT NOT NULL, val INTEGER NOT NULL);');
+'CREATE UNLOGGED TABLE seeded_random(seed INT8 NOT NULL, rand TEXT NOT NULL, val INTEGER NOT NULL);'
+);
 
 # same value to check for determinism
 my $seed = int(rand(1000000000));
 for my $i (1, 2)
 {
-    pgbench("--random-seed=$seed -t 1",
-       0,
-       [qr{processed: 1/1}],
-       [qr{setting random seed to $seed\b}],
-       "random seeded with $seed",
-       { "001_pgbench_random_seed_$i" => q{-- test random functions
+       pgbench(
+               "--random-seed=$seed -t 1",
+               0,
+               [qr{processed: 1/1}],
+               [qr{setting random seed to $seed\b}],
+               "random seeded with $seed",
+               {   "001_pgbench_random_seed_$i" => q{-- test random functions
 \set ur random(1000, 1999)
 \set er random_exponential(2000, 2999, 2.0)
 \set gr random_gaussian(3000, 3999, 3.0)
@@ -436,16 +442,20 @@ INSERT INTO seeded_random(seed, rand, val) VALUES
 }
 
 # check that all runs generated the same 4 values
-my ($ret, $out, $err) =
-  $node->psql('postgres',
-       'SELECT seed, rand, val, COUNT(*) FROM seeded_random GROUP BY seed, rand, val');
+my ($ret, $out, $err) = $node->psql('postgres',
+'SELECT seed, rand, val, COUNT(*) FROM seeded_random GROUP BY seed, rand, val'
+);
 
-ok($ret == 0, "psql seeded_random count ok");
+ok($ret == 0,  "psql seeded_random count ok");
 ok($err eq '', "psql seeded_random count stderr is empty");
-ok($out =~ /\b$seed\|uniform\|1\d\d\d\|2/, "psql seeded_random count uniform");
-ok($out =~ /\b$seed\|exponential\|2\d\d\d\|2/, "psql seeded_random count exponential");
-ok($out =~ /\b$seed\|gaussian\|3\d\d\d\|2/, "psql seeded_random count gaussian");
-ok($out =~ /\b$seed\|zipfian\|4\d\d\d\|2/, "psql seeded_random count zipfian");
+ok($out =~ /\b$seed\|uniform\|1\d\d\d\|2/,
+       "psql seeded_random count uniform");
+ok( $out =~ /\b$seed\|exponential\|2\d\d\d\|2/,
+       "psql seeded_random count exponential");
+ok( $out =~ /\b$seed\|gaussian\|3\d\d\d\|2/,
+       "psql seeded_random count gaussian");
+ok($out =~ /\b$seed\|zipfian\|4\d\d\d\|2/,
+       "psql seeded_random count zipfian");
 
 $node->safe_psql('postgres', 'DROP TABLE seeded_random;');
 
@@ -481,8 +491,8 @@ my @errors = (
        # SQL
        [   'sql syntax error',
                0,
-               [   qr{ERROR:  syntax error}, qr{prepared statement .* does not exist}
-               ],
+               [   qr{ERROR:  syntax error},
+                       qr{prepared statement .* does not exist} ],
                q{-- SQL syntax error
     SELECT 1 + ;
 } ],
@@ -493,7 +503,7 @@ SELECT LEAST(:i, :i, :i, :i, :i, :i, :i, :i, :i, :i, :i);
 } ],
 
        # SHELL
-       [   'shell bad command',               0,
+       [   'shell bad command',                    0,
                [qr{\(shell\) .* meta-command failed}], q{\shell no-such-command} ],
        [   'shell undefined variable', 0,
                [qr{undefined variable ":nosuchvariable"}],
@@ -557,52 +567,34 @@ SELECT LEAST(:i, :i, :i, :i, :i, :i, :i, :i, :i, :i, :i);
                0,
                [qr{exponential parameter must be greater }],
                q{\set i random_exponential(0, 10, 0.0)} ],
-       [       'set zipfian param to 1',
+       [   'set zipfian param to 1',
                0,
                [qr{zipfian parameter must be in range \(0, 1\) U \(1, \d+\]}],
                q{\set i random_zipfian(0, 10, 1)} ],
-       [       'set zipfian param too large',
+       [   'set zipfian param too large',
                0,
                [qr{zipfian parameter must be in range \(0, 1\) U \(1, \d+\]}],
                q{\set i random_zipfian(0, 10, 1000000)} ],
        [   'set non numeric value',                     0,
                [qr{malformed variable "foo" value: "bla"}], q{\set i :foo + 1} ],
-       [ 'set no expression',
-               1,
-               [qr{syntax error}],
-               q{\set i} ],
-       [ 'set missing argument',
+       [ 'set no expression',    1, [qr{syntax error}],      q{\set i} ],
+       [ 'set missing argument', 1, [qr{missing argument}i], q{\set} ],
+       [   'set not a bool',                      0,
+               [qr{cannot coerce double to boolean}], q{\set b NOT 0.0} ],
+       [   'set not an int',                   0,
+               [qr{cannot coerce boolean to int}], q{\set i TRUE + 2} ],
+       [   'set not a double',                    0,
+               [qr{cannot coerce boolean to double}], q{\set d ln(TRUE)} ],
+       [   'set case error',
                1,
-               [qr{missing argument}i],
-               q{\set} ],
-       [ 'set not a bool',
-               0,
-               [ qr{cannot coerce double to boolean} ],
-               q{\set b NOT 0.0} ],
-       [ 'set not an int',
-               0,
-               [ qr{cannot coerce boolean to int} ],
-               q{\set i TRUE + 2} ],
-       [ 'set not a double',
-               0,
-               [ qr{cannot coerce boolean to double} ],
-               q{\set d ln(TRUE)} ],
-       [ 'set case error',
-               1,
-               [ qr{syntax error in command "set"} ],
+               [qr{syntax error in command "set"}],
                q{\set i CASE TRUE THEN 1 ELSE 0 END} ],
-       [ 'set random error',
-               0,
-               [ qr{cannot coerce boolean to int} ],
-               q{\set b random(FALSE, TRUE)} ],
-       [ 'set number of args mismatch',
-               1,
-               [ qr{unexpected number of arguments} ],
-               q{\set d ln(1.0, 2.0))} ],
-       [ 'set at least one arg',
-               1,
-               [ qr{at least one argument expected} ],
-               q{\set i greatest())} ],
+       [   'set random error',                 0,
+               [qr{cannot coerce boolean to int}], q{\set b random(FALSE, TRUE)} ],
+       [   'set number of args mismatch',        1,
+               [qr{unexpected number of arguments}], q{\set d ln(1.0, 2.0))} ],
+       [   'set at least one arg',               1,
+               [qr{at least one argument expected}], q{\set i greatest())} ],
 
        # SETSHELL
        [   'setshell not an int',                0,
@@ -625,8 +617,8 @@ SELECT LEAST(:i, :i, :i, :i, :i, :i, :i, :i, :i, :i, :i);
        [   'misc invalid backslash command',         1,
                [qr{invalid command .* "nosuchcommand"}], q{\nosuchcommand} ],
        [ 'misc empty script', 1, [qr{empty command list for script}], q{} ],
-       [ 'bad boolean', 0, [qr{malformed variable.*trueXXX}], q{\set b :badtrue or true} ],
-    );
+       [   'bad boolean',                     0,
+               [qr{malformed variable.*trueXXX}], q{\set b :badtrue or true} ],);
 
 
 for my $e (@errors)
@@ -635,7 +627,7 @@ for my $e (@errors)
        my $n = '001_pgbench_error_' . $name;
        $n =~ s/ /_/g;
        pgbench(
-               '-n -t 1 -Dfoo=bla -Dnull=null -Dtrue=true -Done=1 -Dzero=0.0 -Dbadtrue=trueXXX -M prepared',
+'-n -t 1 -Dfoo=bla -Dnull=null -Dtrue=true -Done=1 -Dzero=0.0 -Dbadtrue=trueXXX -M prepared',
                $status,
                [ $status ? qr{^$} : qr{processed: 0/1} ],
                $re,
@@ -647,7 +639,7 @@ for my $e (@errors)
 pgbench(
        '-t 1', 0,
        [ qr{processed: 1/1}, qr{zipfian cache array overflowed 1 time\(s\)} ],
-       [ qr{^} ],
+       [qr{^}],
        'pgbench zipfian array overflow on random_zipfian',
        {   '001_pgbench_random_zipfian' => q{
 \set i random_zipfian(1, 100, 0.5)
index af21f046496922174e7046506a1e75d8293876ee..24714960ba4f75aab43c69022ac0ed154d267351 100644 (file)
@@ -15,8 +15,7 @@ $testname =~ s/\.pl$//;
 
 my $testdir = "$TestLib::tmp_check/t_${testname}_stuff";
 mkdir $testdir
-       or
-       BAIL_OUT("could not create test directory \"${testdir}\": $!");
+  or BAIL_OUT("could not create test directory \"${testdir}\": $!");
 
 # invoke pgbench
 sub pgbench
@@ -38,8 +37,10 @@ sub pgbench_scripts
                for my $fn (sort keys %$files)
                {
                        my $filename = $testdir . '/' . $fn;
+
                        # cleanup file weight if any
                        $filename =~ s/\@\d+$//;
+
                        # cleanup from prior runs
                        unlink $filename;
                        append_to_file($filename, $$files{$fn});
@@ -105,14 +106,17 @@ my @options = (
        [ 'ambiguous builtin', '-b s', [qr{ambiguous}] ],
        [   '--progress-timestamp => --progress', '--progress-timestamp',
                [qr{allowed only under}] ],
-       [ '-I without init option', '-I dtg',
+       [   '-I without init option',
+               '-I dtg',
                [qr{cannot be used in benchmarking mode}] ],
-       [ 'invalid init step', '-i -I dta',
-               [qr{unrecognized initialization step},
-                qr{allowed steps are} ] ],
-       [ 'bad random seed', '--random-seed=one',
-               [qr{unrecognized random seed option "one": expecting an unsigned integer, "time" or "rand"},
-                qr{error while setting random seed from --random-seed option} ] ],
+       [   'invalid init step',
+               '-i -I dta',
+               [ qr{unrecognized initialization step}, qr{allowed steps are} ] ],
+       [   'bad random seed',
+               '--random-seed=one',
+               [
+qr{unrecognized random seed option "one": expecting an unsigned integer, "time" or "rand"},
+                       qr{error while setting random seed from --random-seed option} ] ],
 
        # loging sub-options
        [   'sampling => log', '--sampling-rate=0.01',
@@ -161,23 +165,44 @@ pgbench(
        'pgbench builtin list');
 
 my @script_tests = (
+
        # name, err, { file => contents }
-       [ 'missing endif', [qr{\\if without matching \\endif}], {'if-noendif.sql' => '\if 1'} ],
-       [ 'missing if on elif', [qr{\\elif without matching \\if}], {'elif-noif.sql' => '\elif 1'} ],
-       [ 'missing if on else', [qr{\\else without matching \\if}], {'else-noif.sql' => '\else'} ],
-       [ 'missing if on endif', [qr{\\endif without matching \\if}], {'endif-noif.sql' => '\endif'} ],
-       [ 'elif after else', [qr{\\elif after \\else}], {'else-elif.sql' => "\\if 1\n\\else\n\\elif 0\n\\endif"} ],
-       [ 'else after else', [qr{\\else after \\else}], {'else-else.sql' => "\\if 1\n\\else\n\\else\n\\endif"} ],
-       [ 'if syntax error', [qr{syntax error in command "if"}], {'if-bad.sql' => "\\if\n\\endif\n"} ],
-       [ 'elif syntax error', [qr{syntax error in command "elif"}], {'elif-bad.sql' => "\\if 0\n\\elif +\n\\endif\n"} ],
-       [ 'else syntax error', [qr{unexpected argument in command "else"}], {'else-bad.sql' => "\\if 0\n\\else BAD\n\\endif\n"} ],
-       [ 'endif syntax error', [qr{unexpected argument in command "endif"}], {'endif-bad.sql' => "\\if 0\n\\endif BAD\n"} ],
-);
+       [   'missing endif',
+               [qr{\\if without matching \\endif}],
+               { 'if-noendif.sql' => '\if 1' } ],
+       [   'missing if on elif',
+               [qr{\\elif without matching \\if}],
+               { 'elif-noif.sql' => '\elif 1' } ],
+       [   'missing if on else',
+               [qr{\\else without matching \\if}],
+               { 'else-noif.sql' => '\else' } ],
+       [   'missing if on endif',
+               [qr{\\endif without matching \\if}],
+               { 'endif-noif.sql' => '\endif' } ],
+       [   'elif after else',
+               [qr{\\elif after \\else}],
+               { 'else-elif.sql' => "\\if 1\n\\else\n\\elif 0\n\\endif" } ],
+       [   'else after else',
+               [qr{\\else after \\else}],
+               { 'else-else.sql' => "\\if 1\n\\else\n\\else\n\\endif" } ],
+       [   'if syntax error',
+               [qr{syntax error in command "if"}],
+               { 'if-bad.sql' => "\\if\n\\endif\n" } ],
+       [   'elif syntax error',
+               [qr{syntax error in command "elif"}],
+               { 'elif-bad.sql' => "\\if 0\n\\elif +\n\\endif\n" } ],
+       [   'else syntax error',
+               [qr{unexpected argument in command "else"}],
+               { 'else-bad.sql' => "\\if 0\n\\else BAD\n\\endif\n" } ],
+       [   'endif syntax error',
+               [qr{unexpected argument in command "endif"}],
+               { 'endif-bad.sql' => "\\if 0\n\\endif BAD\n" } ],);
 
 for my $t (@script_tests)
 {
        my ($name, $err, $files) = @$t;
-       pgbench_scripts('', 1, [qr{^$}], $err, 'pgbench option error: ' . $name, $files);
+       pgbench_scripts('', 1, [qr{^$}], $err, 'pgbench option error: ' . $name,
+               $files);
 }
 
 done_testing();
index d01804da37165a785b99701ad940d9dc91cc1890..6da89e1b04f314a4c636528fd242320f553e032e 100644 (file)
@@ -16,4 +16,5 @@ $node->init;
 $node->start;
 
 # use a long timeout for the benefit of very slow buildfarm machines
-$node->command_ok([qw(pg_isready --timeout=60)], 'succeeds with server running');
+$node->command_ok([qw(pg_isready --timeout=60)],
+       'succeeds with server running');
index 382210e3b6e2eee482897ce7244668d650aac607..4c477a27aa80d58bf27669953f5fba0483e44b69 100644 (file)
@@ -36,13 +36,17 @@ $node->issues_sql_like(
 $node->command_ok([qw(vacuumdb -Z --table=pg_am dbname=template1)],
        'vacuumdb with connection string');
 
-$node->command_fails([qw(vacuumdb -Zt pg_am;ABORT postgres)],
+$node->command_fails(
+       [qw(vacuumdb -Zt pg_am;ABORT postgres)],
        'trailing command in "-t", without COLUMNS');
+
 # Unwanted; better if it failed.
-$node->command_ok([qw(vacuumdb -Zt pg_am(amname);ABORT postgres)],
+$node->command_ok(
+       [qw(vacuumdb -Zt pg_am(amname);ABORT postgres)],
        'trailing command in "-t", with COLUMNS');
 
-$node->safe_psql('postgres', q|
+$node->safe_psql(
+       'postgres', q|
   CREATE TABLE "need""q(uot" (")x" text);
 
   CREATE FUNCTION f0(int) RETURNS int LANGUAGE SQL AS 'SELECT $1 * $1';
@@ -53,5 +57,6 @@ $node->safe_psql('postgres', q|
 |);
 $node->command_ok([qw|vacuumdb -Z --table="need""q(uot"(")x") postgres|],
        'column list');
-$node->command_fails([qw|vacuumdb -Zt funcidx postgres|],
+$node->command_fails(
+       [qw|vacuumdb -Zt funcidx postgres|],
        'unqualifed name via functional index');
index 8c143cf06f055e61a3e54b8dbc8d031016d8d598..db9b370c2fead46e9139e0b829685f98315bd18f 100755 (executable)
@@ -15,11 +15,11 @@ while (<>)
        next if /^CATALOG\(.*BKI_BOOTSTRAP/;
        next
          unless /\boid *=> *'(\d+)'/
-                 || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+),/
-                 || /^CATALOG\([^,]*, *(\d+)/
-                 || /^DECLARE_INDEX\([^,]*, *(\d+)/
-                 || /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/
-                 || /^DECLARE_TOAST\([^,]*, *(\d+), *(\d+)/;
+         || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+),/
+         || /^CATALOG\([^,]*, *(\d+)/
+         || /^DECLARE_INDEX\([^,]*, *(\d+)/
+         || /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/
+         || /^DECLARE_TOAST\([^,]*, *(\d+), *(\d+)/;
        $oidcounts{$1}++;
        $oidcounts{$2}++ if $2;
 }
index 038ba7bb05ea056ea3d2f837465e9d4486b26a18..8ebbec6c541670ca63c6d134c35a0d51dbf6deff 100644 (file)
@@ -73,7 +73,7 @@ foreach my $datfile (@input_files)
 
        my $header = "$1.h";
        die "There in no header file corresponding to $datfile"
-         if ! -e $header;
+         if !-e $header;
 
        my $catalog = Catalog::ParseHeader($header);
        my $catname = $catalog->{catname};
@@ -186,7 +186,7 @@ sub strip_default_values
        {
                my $attname = $column->{name};
                die "strip_default_values: $catname.$attname undefined\n"
-                 if ! defined $row->{$attname};
+                 if !defined $row->{$attname};
 
                # Delete values that match defaults.
                if (defined $column->{default}
@@ -196,8 +196,9 @@ sub strip_default_values
                }
 
                # Also delete pg_proc.pronargs, since that can be recomputed.
-               if ($catname eq 'pg_proc' && $attname eq 'pronargs' &&
-                       defined($row->{proargtypes}))
+               if (   $catname eq 'pg_proc'
+                       && $attname eq 'pronargs'
+                       && defined($row->{proargtypes}))
                {
                        delete $row->{$attname};
                }
@@ -210,7 +211,7 @@ sub strip_default_values
 # data files.
 sub format_hash
 {
-       my $data = shift;
+       my $data          = shift;
        my @orig_attnames = @_;
 
        # Copy attname to new array if it has a value, so we can determine
@@ -228,7 +229,7 @@ sub format_hash
        my $char_count = 1;
 
        my $threshold;
-       my $hash_str = '';
+       my $hash_str      = '';
        my $element_count = 0;
 
        foreach my $attname (@attnames)
@@ -262,7 +263,7 @@ sub format_hash
                # Include a leading space in the key-value pair, since this will
                # always go after either a comma or an additional padding space on
                # the next line.
-               my $element = " $attname => '$value'";
+               my $element        = " $attname => '$value'";
                my $element_length = length($element);
 
                # If adding the element to the current line would expand the line
index f26460e627fe6dea962c158814e98509af33a312..ba90231989d7f3562e887e8fefb52afdc3467b0b 100644 (file)
@@ -17,12 +17,12 @@ my ($krb5_bin_dir, $krb5_sbin_dir);
 
 if ($^O eq 'darwin')
 {
-       $krb5_bin_dir = '/usr/local/opt/krb5/bin';
+       $krb5_bin_dir  = '/usr/local/opt/krb5/bin';
        $krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
 }
 elsif ($^O eq 'freebsd')
 {
-       $krb5_bin_dir = '/usr/local/bin';
+       $krb5_bin_dir  = '/usr/local/bin';
        $krb5_sbin_dir = '/usr/local/sbin';
 }
 elsif ($^O eq 'linux')
@@ -30,45 +30,48 @@ elsif ($^O eq 'linux')
        $krb5_sbin_dir = '/usr/sbin';
 }
 
-my $krb5_config = 'krb5-config';
-my $kinit = 'kinit';
-my $kdb5_util = 'kdb5_util';
+my $krb5_config  = 'krb5-config';
+my $kinit        = 'kinit';
+my $kdb5_util    = 'kdb5_util';
 my $kadmin_local = 'kadmin.local';
-my $krb5kdc = 'krb5kdc';
+my $krb5kdc      = 'krb5kdc';
 
 if ($krb5_bin_dir && -d $krb5_bin_dir)
 {
        $krb5_config = $krb5_bin_dir . '/' . $krb5_config;
-       $kinit = $krb5_bin_dir . '/' . $kinit;
+       $kinit       = $krb5_bin_dir . '/' . $kinit;
 }
 if ($krb5_sbin_dir && -d $krb5_sbin_dir)
 {
-       $kdb5_util = $krb5_sbin_dir . '/' . $kdb5_util;
+       $kdb5_util    = $krb5_sbin_dir . '/' . $kdb5_util;
        $kadmin_local = $krb5_sbin_dir . '/' . $kadmin_local;
-       $krb5kdc = $krb5_sbin_dir . '/' . $krb5kdc;
+       $krb5kdc      = $krb5_sbin_dir . '/' . $krb5kdc;
 }
 
 my $realm = 'EXAMPLE.COM';
 
-my $krb5_conf = "${TestLib::tmp_check}/krb5.conf";
-my $kdc_conf = "${TestLib::tmp_check}/kdc.conf";
-my $krb5_log = "${TestLib::tmp_check}/krb5libs.log";
-my $kdc_log = "${TestLib::tmp_check}/krb5kdc.log";
-my $kdc_port = int(rand() * 16384) + 49152;
+my $krb5_conf   = "${TestLib::tmp_check}/krb5.conf";
+my $kdc_conf    = "${TestLib::tmp_check}/kdc.conf";
+my $krb5_log    = "${TestLib::tmp_check}/krb5libs.log";
+my $kdc_log     = "${TestLib::tmp_check}/krb5kdc.log";
+my $kdc_port    = int(rand() * 16384) + 49152;
 my $kdc_datadir = "${TestLib::tmp_check}/krb5kdc";
 my $kdc_pidfile = "${TestLib::tmp_check}/krb5kdc.pid";
-my $keytab = "${TestLib::tmp_check}/krb5.keytab";
+my $keytab      = "${TestLib::tmp_check}/krb5.keytab";
 
 note "setting up Kerberos";