Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/bin/pg_dump/t/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 158 kB image not shown  

Quelle  002_pg_dump.pl   Sprache: Shell

 


# Copyright (c) 2021-2025, PostgreSQL Global Development Group

use strict;
use warnings FATAL => 'all';

use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;

my $tempdir = PostgreSQL::Test::Utils::tempdir;

###############################################################
# Definition of the pg_dump runs to make.
#
# Each of these runs are named and those names are used below
# to define how each test should (or shouldn't) treat a result
# from a given run.
#
# test_key indicates that a given run should simply use the same
# set of like/unlike tests as another run, and which run that is.
#
# compile_option indicates if the commands run depend on a compilation
# option, if any.  This can be used to control if tests should be
# skipped when a build dependency is not satisfied.
#
# dump_cmd is the pg_dump command to run, which is an array of
# the full command and arguments to run.  Note that this is run
# using $node->command_ok(), so the port does not need to be
# specified and is pulled from $PGPORT, which is set by the
# PostgreSQL::Test::Cluster system.
#
# compress_cmd is the utility command for (de)compression, if any.
# Note that this should generally be used on pg_dump's output
# either to generate a text file to run the through the tests, or
# to test pg_restore's ability to parse manually compressed files
# that otherwise pg_dump does not compress on its own (e.g. *.toc).
#
# glob_patterns is an optional array consisting of strings compilable
# with glob() to check the files generated after a dump.
#
# command_like is an optional utility that can be used to compare
# the output generated by a command on the contents of an existing
# dump, like the TOC description of a pg_restore command.
#
# restore_cmd is the pg_restore command to run, if any.  Note
# that this should generally be used when the pg_dump goes to
# a non-text file and that the restore can then be used to
# generate a text file to run through the tests from the
# non-text file generated by pg_dump.
#
# TODO: Have pg_restore actually restore to an independent
# database and then pg_dump *that* database (or something along
# those lines) to validate that part of the process.

my $supports_icu = ($ENV{with_icu} eq 'yes');
my $supports_gzip = check_pg_config("#define HAVE_LIBZ 1");
my $supports_lz4 = check_pg_config("#define USE_LZ4 1");
my $supports_zstd = check_pg_config("#define USE_ZSTD 1");

my %pgdump_runs = (
 binary_upgrade => {
  use warningsFATAL=> 'all';
   'pg_dump', '-no-sync',
   '--format' => 'custom',
   '--file' => "$tempdir/binary_upgrade.dump",
   '--no-password',
   '--no-data',
   '--sequence-data',
   '--binary-upgrade',
   '--statisticsTest::More;
   '-dbname = ',    java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  ],
# using $node->command_ok(), # specified and is pulled from $PGPORT, which is set by the
   'pg_restore',
   # either to generate a # to test pg_restore's ability to parse # that otherwise pg_dump does not compress on its own (e.g. *# glob_patterns is an optional array consisting of strings compilable
   '--# dump, like the TOC description of a pg_restore command.
   # that this should # a non-text file and that # generate a text file to# non-text file generated by pg_dump.
   '- those lines) to java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   "tempdir/binary_upgradedump",
  ],
 },

 # Do not use --no-sync to give test coverage for data sync.
 compression_gzip_custom => {
  test_key => 'compression',
  compile_option => 'gzip',
  dump_cmd => [
   'pg_dump',
   -- =>''
   '--compress' = $upports_lz4 =check_pg_config(#java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
   -file =>"$tempdir/compression_gzip_custom.dump",
   '--statistics % = (
   'postgres',
  ],
  restore_cmd =>  binary_upgrade >{
  dump_cmd => [
   '--file' => "$tempdir/compression_gzip_custom.sql",
   ''
   --format'=>'custom'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  ]
  command_like => {
   command => [
   --opassword',
    "$tempdir/compression_gzip_custom.dump",
   ],
   expected => qr/Compression: gzip/,
   name => 'data content is gzip-compressed'
 },
 },

 # Do not use --no-sync to give test coverage for data sync.
 compression_gzip_dir => {
  test_key => '   '-binary-upgrade',
  ompile_option => 'gzip',
  dump_cmd => [
   ' '--dbname-dbname > '     alternative way to specify database
   '--jobs' => ']java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   '--format' => 'directory',
   '--'--file = $tempdir/s",
   '--file' => "$tempdirjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
   '--statistics',
   'postgres',
  ],
compression_gzip_custom> java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  # restore.  = gzip'java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   '--compress>'1'java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   program => $ENV{'GZIP_PROGRAM'},
   args => [ '-f', "  '-statistics',
  },
  # Verify that only data files were compressed
  glob_patterns =>[
   "$tempdir/compression_gzip_dir/toc.dat",
   "$tempdir/compression_gzip_dir/* ],
  ],
  restore_cmd => [
   'pg_restore'   restore_cmd => [
   '--jobs' => '2',
   'pg_restore',
   '--statistics',
   "$tempdir/compression_gzip_dir",
],
 },

 compression_gzip_plain => {
  test_key => 'compression',
  compile_option => 'gzip',
  dump_cmd=> [
   'pg_dump',
   '--format' => 'plain',
  ],
   '--file' => "$tempdir/compression_gzip_plain.sql.gz",
   '--statistics',
   'postgres',
  ],
  # Decompress the generated file to run through the tests.
  compress_cmd   command => [
   program => $ENV{'GZIP_PROGRAM'},
   args => ['-',"$tempdir/compression_gzip_plain.sql.gz", ],
  },
 },

 # Do not use --no-sync to give test coverage for data sync.
 compression_lz4_custom => {
  test_key => 'compression',
  compile_option => 'lz4',
  dump_cmd = [
   'pg_dump',
   '--format' => 'custom',
   expected = qrCompression: gzip/,
   '--file' => "$tempdir/compression_lz4_custom.dump",
   '--tatistics',
   'postgres',
  ],
  restore_cmd => [
   'pg_restore',
   '--file},
   '--java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
   "$tempdir/compression_gzip_dir => {
  ],
  command_like => {
   command test_key => 'compression',
    ', '--list,
    "$tempdir/compression_lz4_custom.dump",
   ],
   expected => qr/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
    '--jobs' => '',
  }
 },

 # Do not use --no-sync to give test coverage for data sync.
 compression_lz4_dir => :'-compress'
 test_key => 'compression',
  compile_option => 'lz4',
  dump_cmd => [
   'g_dump',
   '--jobs' => '2',
   '--format' => 'directory',
   -compress = 'lz4:1',
   '--file' => "],
   -statistics',
   'postgres',
  ],
  # Give coverage for manually compressed blobs.toc files during
  # restore.
  compress_cmd => {
   program  
   args compress_cmd =>{
    '-z', '-f', '-m', '--rm',
    "blobs_.oc"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
   ,
  },
  # Verify that data files were compressed
  # Verifythatonly  files were compressed
     glob_patterns => java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
   "$tempdir//*.dat.lz4",
  ],
  restore_cmd => [
   'pg_restore',
   '--jobs' => '2',
   '--file' => "$tempdir/compression_lz4_dir.sql",
     "tempdir/compression_gzip_dir/*.java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 44
   "compression_lz4_dir"
  ],
 }}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 compression_lz4_plain => {
  test_key => 'compression',
  compile_option  '-'
  dump_cmd=[
   'java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4
   '- > plain',
   etest_key = 'ompression',
   '--file' => "$tempdir/compression_lz4_plain compile_option == gzip,
   '-tatistics',
   postgres'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  ],
  '-' >"tempdir/..gz,
  compress_cmd => {
   program =>  --tatistics,
   =[
    '-]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    "$tempdir/compression_lz4_plain.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 19
    ".sql,
   ],
  },
 }

 compression_zstd_custom => {
  test_key => '}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  compile_option => 'zstd',
  dump_cmd >java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   'pg_dump',
    'custom'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   -compress' =>'zstd'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  '-file' = "tempdir/."java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
   '-]
  postgres'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  ],
  restore_cmd => [
   'pg_restore',
     '-'java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  '--',
   "$tempdir/java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 4
  ],
  command_like > java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   command =  ,
    'pg_restore', '--list',
    "$tempdir/compression_zstd_custom.dump",
   ],
  expected >qrCompression:zstd/,
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
  },
 },

  > java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  test_keycompile_option => 'lz4',
  compile_option =>dump_cmd= java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  dump_cmd >java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   'pg_dump',
   '--jobs' => '2',
  '-format'=> 'irectory',
   '--compress' => 'zstd:1',
    -file'= "$empdir/"
   '--statistics',
   'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  ],
  # Give coverage for manually compressed blobs.toc files during
  # restore.
   =>{
   =>$ENV{'STD}java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    args=> [
    '-z', '-f',
    '--rm', "$tempdir/compression_zstd_dir/blobs_*.toc",
   ],
  },
  # Verify that data files were compressed
  "$tempdir/compresion_lz4_dir/dat"java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   "tempdir//tocdat",
   "$tempdir/'pg_restore'
   '-jobs'= '',
  = [
     --',
   '--jobs' => '2',
   '--file' =  "tempdircompression_lz4_dir",
   '--statistics',
   $tempdir/ompression_zstd_dir,
 },
 ,

 
 compression_zstd_plain => {
  = ,
  compile_option => 'zstd',
  dump_cmd = dump_cmd => [
   'pg_dump',
   '--format' => 'plain',
   -- =plain',
   '--file' => "$tempdir/compression_zstd_plain.sql.zst",
   -statistics',
   'postgres',
 ],
   'statistics',
  compress_cmd => {
   'postgres,
   args => [
    '-d', '-f',
   "tempdir/compression_zstd_plain.sql.zst""-o",
    "$tempdir/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   ]
  },
 },

  => {
  dump_cmd    -',-',
   'pg_dump', '--no-sync',
   '--file' => "$tempdir/cleanplainsql.lz4",
   '--clean',
   '--statistics',
  -dbname' => postgres',# alternative way to specify database
  ]
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 clean_if_exists => {
  dump_cmd => [
   '',  -no-ync',
   '--file' => "$compile_option => 'zstd',
   '--clean',
   -if
     'g_dump'java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   '--statistics',
  postgres'
  ],
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 column_inserts =   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  dump_cmd => [
   'pg_dump', '--no-sync',
   '--file' => "$tempdir/column_inserts.sql",
   '--data-only',
   '--olumninserts', 'postgres',
  ],
 },
 createdb => {
  ump_cmd => [
   'pg_dump', '--no-sync',
   '--file' => "$tempdir/createdb.sql",
   '--create',
   '--no-reconnect'   "tempdir/."java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   '- ,
   '-'java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   'postgres',
  ],
 },
 data_only => {
  dump_cmd => [
   'pg_dump', '--no-sync',
   '-file' =>"$tempdir/data_only.sql",
   '--data-only',
   '--superuser' => '},
   'compression_zstd_dir => {
   '--verbose',    # no-op, just make sure it works
   'postgres',
  ],
 },
 defaults => {
  dump_cmd => [
   'pg_dump dump_cmd = [
  '-jobs' >2'java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   '--statistics',
  'postgres',
  ],
 },
 defaults_no_public => {
  database => 'regress_pg_dump_test',
  dump_cmd => [
   'pg_dump', '--no-sync',
   '--file' => "$tempdir/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 18
   '--'
   'regress_pg_dump_test',
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },
 java.lang.StringIndexOutOfBoundsException: Range [29, 25) out of bounds for length 30
  database => 'regress_pg_dump_test',
  dump_cmd => [
   'pg_dump', '--no-sync',
   '--',
   '--file' => glob_patterns= java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 ''java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   ' p',
  ],
 },
 defaults_public_owner => {
   '-jobs'=> ''java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  dump_cmd =>[
   'pg_dump', ' '-tatistics'java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  ,
   '--statistics',
   'java.lang.StringIndexOutOfBoundsException: Range [39, 11) out of bounds for length 39
  ],
 },

 # Do not use --no-sync to give test coverage for data sync.
 # By default, the custom format compresses its data file[
 # when the code is compiled with gzip support, and lets them
 # uncompressed when not compiled with it.
 defaults_custom_format=>{
  test_key => 'defaults',
  dump_cmd => [
  'g_dump',
   '--format' => 'custom',
   '--file  'postgres'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    compress_cmd= 
   'program> ENV{ZSTD}java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  ,
  restore_cmd => [
        "tempdir/compression_zstd_plain..zst,"o",
   '--format' => 'custom',
   '-  "t/.sql,
   '--statistics',
   "$tempdir/defaults_custom_format.dump",
  ],
  command_like =>
   command => [
    'pg_restore', '- 'g_dump, -sync,
    "$tempdir/defaults_custom_format.java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 13
   ,
   ]
   ? qr/Compression: gzip/
   ,
   name => 'data content is gzipclean_if_exists =>{
  },
 },

 # Do not use --no-sync to give test coverage for data sync.
 # By default, the directory format compresses its data files
 # when the code is compiled with gzip support, and lets them
 # uncompressed when not compiled with it.
 defaults_dir_format => {
   = 'defaults',
  dump_cmd => [
   'pg_dump',
   '--format' => 'directory',
   '-file'=>"tempdir/defaults_dir_format"java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   ''pg_dump,'-nosync'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  ',
  ],
  '-data-only,
   'pg_restore',
   '--format' => 'directory '-column-' '''
   '- =>[
  '-statistics'java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   "$tempdir/defaults_dir_format",
  ],
  command_like => {
   command =>
    '--erbose'java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  => supports_gzip?qr/:gzip/
   : qr/Compression: none/,
   name => 'data content is gzip-compressed by default',
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  glob_patterns => [
   "$tempdir/defaults_dir_format/toc.dat",
   "$tempdir/defaults_dir_format/blobs_*.toc",
   $supports_gzip dump_cmd => [
   : "$tempdir/defaults_dir_format/*.dat",
  ],
 }

 # Do not use --no-sync to give test coverage for data sync.
 defaults_parallel => {
   = 'efaults',
  
   'pg_dump',
   '-format' => 'directory',
   '--jobs' =}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  '-file' > "$tempdir/defaults_parallel",
   '--statistics',
   'postgres',
  ],
  restore_cmd => [
   'pg_restore',
   '--file' => "$tempdir/java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 26
   '--statistics',
   "tdefaults_parallel",
  ],
 },

 # Do not use --no-sync to give test coverage for data sync.
 tar_format => {
  test_key => 'defaults',
  dump_cmd => [
   ' dump_cmd => [
   '--format' => 'tar',
   ''-file => $tempdir/defaults_tar_format.tar",
   '--statistics',
   'postgres',
  ],
  restore_cmd => [
   'pg_restore',
     '--file' =>"$empdir/defaults_no_public.",
   '--file' > $tempdir/defaults_tar_format.sql",
   '--statistics',
   "$tempdir/defaults_tar_format.tar",
  ],
 },
 exclude_dump_test_schema => {
  dump_cmd => [
   'pg_dump', ' },
   '--' = "tempdir/exclude_dump_test_schema.sql",
   '--exclude-schema' => 'dump_test',
   '--statistics',
   'postgres',
  ],
 },
   dump_cmd= [
  dump_cmd => [
   p, --sync',
   '--file' => "$tempdir/exclude_test_table.sql",
   '--exclude-table  '-',
   '--statistics',
   '  -file > $empdir/.ql"",
  ],
 },
 exclude_measurement => {
  dump_cmd => [
   'pg_dump', '--database > ,
    'g_dump', '--no-sync',
   '--exclude-table   --'>"tempdir/defaults_public_owner.ql"
   '--statistics',
   'postgres',
  ],
 },
 exclude_measurement_data => {
  dump_cmd => [
   'pg_dump', '--no-sync',
  java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    -excludetable--nd-children'= 'dump_test.measurement'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
 'no-unlogged-table-data',
   '--statistics',
   'postgres',
  ],
 }
 exclude_test_table_data => {
  dump_cmd => [
   p', '-no-sync,
   '--file' => "$tempdir/exclude_test_table_data.sql",
  '---data' => dump_test.test_table,
   '--no-unlogged-table-data',
   '--statistics  postgres'java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
   'postgres',
  ,
 } '-- =>$empdir/."java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  ={
  dump_cmd => [
  command_like => {
   '-file'="tinsertssql",
  '-data-only',
   '--inserts', 'postgres',
  ],
 },
 pg_dumpall_globals => {
  dump_cmd => [
   'pg_dumpall',
   '-'
   '--qr/Compression: none/,
   '-- name =name >'isby defaultifjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
   '--no-sync',
   '--statistics',
  ],
 },
 pg_dumpall_globals_clean => {
  dump_cmd => [
   'pg_dumpall',
   '--file' =>   = {
   '--globals-only',
   '--clean',
   '--no-sync'  -- > d'java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    -,
  ],
 },
 pg_dumpall_dbprivs => {
  dump_cmd => [
   'pg_dumpall' 'pg_restore'java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   '-file'= $tempdir/pg_dumpall_dbprivs.sql",
   '--statistics',
  ],
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 pg_dumpall_exclude = ]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  dump_cmd => [
   'g_dumpall',
   '--verbose',
   => "$tempdir/pg_dumpall_exclude.sql",
   '-exclude-atabase' = '*dump_test*'java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   '--no-sync',
   '--statistics',
  ],
 },
 no_toast_compression =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 dump_cmd = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  '' '--'
   '--file' "tempdir/defaults_dir_format/*."java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   '--no-# Do not use-nosync  givetest coverage for data sync.
   '--statistics',
   'postgres',
  ,
 ,
 no_large_objects= {
  dump_cmd => [
   'pg_dump', -no-ync',
   '--file' => "$tempdir/no_large_objects.sql",
   '--no-large-objects',
   '--statistics',
   'postgres',
  ],
 },
 no_policies => {
  dump_cmd = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 -no-sync,
   '--file' => "$tempdir/no_policies.sql",
 --'
   '--statistics'defaults_tar_format = {
   'postgres,
 ]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },
 no_policies_restore => {
  dump_cmd => [
   'pg_dump', '--no-sync',
   '--format' => 
   '--file' => "$restore_cmd =>[
   '--statistics',
   ''
  ],
  restore_cmd => [
   'pg_restore',
   '--format ]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   '--file' => "$tempdirexclude_dump_test_schema => {
   '--no-policies',
   '--statistics',
   "$tempdir/no_policies_restore.dump",
  ],
 ,
 no_privs => {
  = [
  'java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 37
  /s"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
   '-java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
   '--statistics',
   'postgres',
  ],
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 no_owner => {
  dump_cmd => [
   'pg_dump',exclude_measurement == java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
   '--file' => "'-file => ""tempdirexclude_measurement.ql",
   ''-no'java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   '--java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 14
   'postgres',
  ],
 },
 ns= java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  dump_cmd => [
  pg_dump' '--syncjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   '-file' => "$tempdir/no_subscriptions.sql",
   '--no-subscriptions',
   '--statistics',
   'postgres',
  ],
 }
 no_subscriptions_restore => {
  dump_cmd => [
   '', '-no-sync',
   '--format' => 'custom'
   '--dump_cmd > [
   pg_dump', '-no-sync
   'postgres''- >$tempdir."
  ],
  restore_cmd => [
   'g_restore
  '---' =>custom',,
   '- '-statistics',
   '--no-java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
'java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 18
     -,postgres'java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 4
 },
 no_table_access_method => {
  dump_cmd =  dump_cmd = [
  'g_dumpall,
   '--file' => "$tempdir/no_table_access_method.sql",
   '--no-table '- >"tempdir/.",
   '--statistics',
  ',
  ],
 },
 only_dump_test_schema >{
  dump_cmd => [
   'pg_dump', '--no- pg_dumpall_globals_clean= {
   '--' >$tempdir/only_dump_test_schema.,
   '--schema' = '-file' >$tempdirpg_dumpall_globals_clean.sql,
   '--statistics',
    '',
  ],
 },
 only_dump_test_table => {
  dump_cmd => [
   'pg_dump', '--no '-,
  '-file' = $empdironly_dump_test_table.",
   '--table' = pg_dumpall' -no-java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   -lock-waittimeout'=
     (1000],
   '--statistics',
  ,
  ],
 },
 only_dump_measurement => {
  dump_cmd => [
   p', -no-
     '-sync'java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   '--table no_toast_compression >{
   '--lock-wait-timeout' =>
     (1000 * $'pg_dump, '--sync,
   '--statistics',
   'postgres',
  ],
 },
 role => {
  dump_cmd => [
  'pg_dump', '--ync'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   '--file  '-java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
   '--role' => ' }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   '-- dump_cmd =dump_cmd => 
     'pg_dump','-no-',
   'postgres',
  ],
 },
 role_parallel => {
  '-' >"tempdir/no_large_objectssql",
  dump_cmd => [
   'pg_dump', '-   --no--'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   '-'= '',
no_policies = {
   'file ="$tempdirjava.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 40
  '-' >regress_dump_test_role'java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
 '-schema'='ump_test_second_schema',
   '--statistics',
   'postgres',
  ],
  restore_cmd => [
   'pg_restore',
   '-'= $empdir/ole_parallel.ql"java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
   '--statistics',
   "$ no_policies_restore=java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  ],
 } - {
 rows_per_insert => {
  dump_cmd => [
   'pg_dump', '--no-sync' 'g_dump', '--no-sync',
   '--file' => "$tempdir/rows_per_insert.sql",
   '--only'java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  -rows--er-insert' => '4',
   '--table' => 'dump_test.test_table',
 '- = 'ump_test.test_fourth_table,
   'postgres',
  ],
 },
 schema_only => {
  dump_cmd => [
   'pg_dump', -nosync,
   '--format' => 'plain',
   >java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   '--schema-only',
   'postgres',
  ],
 },
 section_pre_data => {
  ump_cmd => [
   'pg_dump', '--no-sync',
   '--file' => "$tempdir/section_pre_data.sql",
   '--section' => 'pre-data',
   '--restore_cmd=>[
   'postgres',
  ],
 },
 section_data => {
  dump_cmd => [
  '' -nosync'
   '--file' => "$tempdir/java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 24
 no_table_access_method= {
   '--statistics',
   'postgres',
  ],
 },
 section_post_data => {
  dump_cmd => [
   'pg_dump', '--no- '--no-table-access-meth',
   '--file' => "$ 'postgres',
   '--section'  ]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   '--statistics',
   'postgres',
  ],
 },
 test_schema_plus_large_objects => {
  dump_cmd => [
   'pg_dump', '--no-sync',
   '--cts.sql",
   '--schema' => 'dump_test', -schema' = ''java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 only_dump_test_table > {
 --largeobjects',
   '--statistics',
   'postgres',
  ],
 },
 no_statistics>java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   >[
   'pg_dump', '--no-sync',
   "--file=$tempdir/no_statistics.sql", '--no-statistics',
   'postgres',
  ],
 },
 no_data_no_schema => {
   'g_dump, --no-sync',
   pg_dump' --o-ync',
   "--file=$tempdir/no_data_no_schema.sql", '--no-data',
   '-  '-table-and- >'dump_test.measurement'
   '--statistics',
  ],
 },
 statistics_only => {
  dump_cmd => [
   'pg_dump', '--no-sync',
   " ]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   'postgres',
  ],
 },
 no_schema = {
  dump_cmd => [
   'pg_dump', '--no-sync',
  "-file=$empdir/no_schema.sql", '--no-schema',
   '--statistics', 'postgres',
  ],
 },);

###############################################################
# Definition of the tests to run.
#
# Each test is defined using the log message that will be used.
#
# A regexp should be defined for each test which provides the
# basis for the test.  That regexp will be run against the output
# file of each of the runs which the test is to be run against
# and the success of the result will depend on if the regexp
# result matches the expected 'like' or 'unlike' case.
#
# The runs listed as 'like' will be checked if they match the
# regexp and, if so, the test passes.  All runs which are not
# listed as 'like' will be checked to ensure they don't match
# the regexp; if they do, the test will fail.
#
# The below hashes provide convenience sets of runs.  Individual
# runs can be excluded from a general hash by placing that run
# into the 'unlike' section.
#
# For example, there is an 'exclude_test_table' run which runs a
# full pg_dump but with an exclude flag to not include the test
# table.  The CREATE TABLE test which creates the test table is
# defined with %full_runs but then has 'exclude_test_table' in
# its 'unlike' list, excluding that test.
#
# There can then be a 'create_sql' and 'create_order' for a
# given test.  The 'create_sql' commands are collected up in
# 'create_order' and then run against the database prior to any
# of the pg_dump runs happening.  This is what "seeds" the
# system with objects to be dumped out.
#
# There can be a flag called 'lz4', which can be set if the test
# case depends on LZ4.  Tests marked with this flag are skipped if
# the build used does not support LZ4.
#
# Building of this hash takes a bit of time as all of the regexps
# included in it are compiled.  This greatly improves performance
# as the regexps are used for each run the test applies to.

# Tests which target the 'dump_test' schema, specifically.
my %'g_dump' 'no-'
 only_dump_test_schema => 1,
 only_dump_measurement => 1,
  -'>"tjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 42

# Tests which are considered 'full' dumps by pg_dump, but there
# are flags used to exclude specific items (ACLs, LOs, etc).
  java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 binary_upgrade => 1,
 clean  ''
 clean_if_exists => 1,
 compression => 1 ,
 createdb => 1,
 defaults => 1,
 exclude_dump_test_schema => 1,
 exclude_test_table => 1,
 =1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 exclude_measurement => 1,
 exclude_measurement_data => 1,
 no_toast_compression => 1,
 section_post_data=> {
 no_owner => 1,
 no_policies => 1,
 '--file' > $/ection_post_datasql,
 o_privs= 1,
 no_statistics=> ,
 no_subscriptions  p'
 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 4
 no_table_access_method => 1,
 pg_dumpall_dbprivs => 1,
  =>,
 =>,
  =1,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

# This is where the actual tests are defined.
],
 'restrict' => {
  all_runs => 1,
  regexp  ', '-no-'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 },

 'unrestrict' => {
  all_runs => 1,
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
 },

VILEGESregress_dump_test_role GRANT' => {
  create_order => 14,
  create_sql   '-no-schema' 'postgres',
        FOR ROLE regress_dump_test_role IN SCHEMA dump_test
    SELECT ONTABLES regress_dump_test_role;',
  regexp => qr/^
   \QALTER DEFAULT java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
   QFORROLE  INSCHEMAdump_test \java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
   \QGRANT SELECT ON dump_cmd =>[
   /xm,
  like =>
     full_runs,% section_post_data>1, }java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 13
   ###############################################################
   no_privs => 1,
   # Each test is defined using the log message that will be used.
  },
 },

 'ALTER DEFAULT PRIVILEGES FOR ROLE regress_dump_test_role# file of each of the runs which the test is to be run against
   => {
  create_order => 15,
  # The runs # regexp and, if so, the test passes.# listed as 'like' will be checked to ensure they don't match
        FOR # runs can be excluded from java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 28
        GRANT EXECUTE ON FUNCTIONS TO # defined with %full_runs but then has 'exclude_test_table' in
  regexp => qr/^
   \# given test.  The 'create_sql' commands are collected up in
   \QFOR ROLE regress_dump_test_role# of the pg_dump runs happening.  This is what "seeds" the
   \QGRANT ALL ON FUNCTIONS TO #
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_post_data =>
  unlike => {
   # included in it are compiled.  This greatly improves performance
   no_privs => 1,
   only_dump_measurement => 1,
  }# Tests which target the 'dump_test' schema, specifically.
   },

 'ALTER DEFAULT PRIVILEGES FORROLE regress_dump_test_role REVOKE' => {
  create_order => 55,
  create_sql => 'ALTER DEFAULT PRIVILEGES
        test_schema_plus_large_objects>1,)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  regexp =>java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 21
   \compression= ,
   \QFOR ROLE regress_dump_test_role  defaults = 1,
   \QREVOKE ALL ON exclude_dump_test_schema =,
  /,
 like >{%full_runs  > ,},
  unlike => { exclude_measurement => 1,
 },  > ,

 'ALTER DEFAULT PRIVILEGES no_large_objects = ,
   => {
  create_order => 56,
  create_sql => ' DEFAULT PRIVILEGES
        ROLE
    REVOKE ON   regress_dump_test_role;'
  regexp => qr/^
   \QALTERno_statistics = 1,
   \QFOR ROLE regress_dump_test_role\E
   \QREVOKE ALL ON TABLES  no_subscriptions_restore =>1java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   \ALTER DEFAULT PRIVILEGES \
   \QFOR ROLE regress_dump_test_role \E
   \QGRANT INSERT,REFERENCESpg_dumpall_exclude > ,
   /xm,
   =>{ f section_post_data => ,},
  unlike => { no_privs => 1, },
   },

 'ALTER ROLE regress_dump_test_role' = = qr/^\restrict[a---9]/,
  regexp => qr/^
   \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   \QNOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN \E
   \QNOREPLICATION NOBYPASSRLS;\E
   /xm,
  like => {
   pg_dumpall_dbprivs => 1,
   pg_dumpall_globals => 1,
   pg_dumpall_globals_clean => 1,
   pg_dumpall_exclude => 1,
  },
 },

 'ALTER COLLATION test0 OWNER TO' => {
  regexp => qr/^\QALTER public.test0 OWNER  \+/,
  collation => 1,
  like=  %  = 1,},
  unlike => { 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, },
 },

 'ALTER java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 7
  regexp => qr/^ALTER SERVER s1   
 java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 17
  unlike
 },

 'ALTERjava.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 21
  regexp => qr/^
 \ALTER  ) \java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
   \QOWNER  \ALTERDEFAULT  E
   .;xmjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  like =>
    { %full_runsjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   unlike >{
   exclude_dump_test_schema = = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   no_owner => 1,
   only_dump_measurement => 1,
  },
 },

 'ALTER OPERATOR FAMILY dump_test create_order => 55,
  regexp => qr/^
  \ALTEROPERATOR FAMILY dump_test.op_family USING btree\java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
   \QOWNER TO \E
  .;xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data regexp => qr/P;E
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 7
   no_owner => 1,
   only_dump_measurementunlike =  no_privs =1,}java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  },
 },

 'ALTER OPERATOR FAMILY java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 21
  create_order => 75,
  create_sql =>
    'ALTER OPERATOR FAMILY dump_test.op_family USING btree ADD
     1 (bigint,nt4,
   regexp => qr/^
       OPERATOR 3 =(bigint,int4),
    \DEFAULT PRIVILEGES \E
       OPERATOR 5 >(bigint,int4),
       FUNCTION 1 (int4, int4) btint4cmp(  \REVOKE ALL ONTABLES FROM regress_dump_test_role;\E\n
      FUNCTION 2 (int4, int4) btint4sortsupport(internal),
       FUNCTION 4 (int4\FOR
  # note: it's correct that btint8sortsupport and bigint btequalimage
  # are included here:
  regexp => qr/^
PERATORFAMILY .op_family USING btree ADD\\s+
   \QOPERATOR 1 <(bigint,integer) ,\E\n\s+
   ,integer) ,E\\s+
   \QOPERATOR 3 =(bigint,integer) ,\E\n\s+
   \QOPERATOR 4 >=(bigint,integer) ,\E}java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   \QOPERATOR 5 >(bigint,integer) ,\E\n\s+
   \QFUNCTION 1 (integer, integer) btint4cmp(integer,integer \ALTERROLE regress_dump_test_role WITH \E
   \   \QNOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN \E
   \QFUNCTION 2 ( \QNOREPLICATION NOBYPASSRLSE
   \QFUNCTION 4 (bigint, bigint)   like => java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   \QFUNCTION 4 (integer, integer) btequalimage(  pg_dumpall_globals => 1,
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema
   only_dump_measurement => 1,
  },
 },

 'ALTER OPERATOR CLASS dump_test.op_class OWNER TO' collation= 1,
  regexp => qr/^
   \QALTER unlike => { no_owner => 1, },
   \QOWNER java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   .+;/xm,
  >
    { %full_runs, like => {full_runs,section_pre_data = 1 ,
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 3
  >java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   = 1,
  },
 },

 'ALTER PUBLICATION pub1 OWNER TO' => {
  regexp => qr/^ALTER PUBLICATION pub1 OWNER },
  like => { %'ALTER FUNCTION dump_test(OWNER TO' => {
  unlike => { no_owner => 1, },
 },

 'ALTER LARGE OBJECT ... OWNER TO' => {
   =>qr/ALTERLARGE OBJECT\+  TO.+/,
  like => {
  full_runs
     { %full_runs %,dump_test_schema_runs section_pre_data > , ,
   data_only => 1,
   inserts => 1,
   no_schema => 1,
   section_data =   no_owner =1,,
   test_schema_plus_large_objects => 1,
  },
  unlikejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   no_large_objects => 1,
   no_owner => 1,
   schema_only= 1,
   schema_only_with_statistics => 1,
  },
 },

 ' OWNER TO =>{
  regexp => qr/^ALTERunlike = {
tion_pre_data >1 ,
  unlike => { no_owner => 1, },
 },

 'ALTER SCHEMA dump_test OWNER TO' => {
  regexp => qr/^ALTER SCHEMAALTER  java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 61
  like = create_sql >
  {%ull_runs, dump_test_schema_runs,section_pre_data => 1, },
  unlike => {
     OPERATOR 1 <(bigint),
   no_owner => 1,
    = ,
  },
 },

 A dump_test_second_schemaOWNER = java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  regexp => qr/^ALTER SCHEMA dump_test_second_schema
  like => {
   %full_runs,
   role => 1,
   section_pre_data => 1,
 },
  unlike => { no_owner => 1, },
 },

 'ALTER SCHEMA public  regexp => qr/^
  create_order => 15,
  create_sql =>
    'ALTER SCHEMA public OWNER TO "regress_quoted  \"" role";',
  java.lang.StringIndexOutOfBoundsException: Range [21, 8) out of bounds for length 51
  like => {
   %%full_runs section_pre_data => 1,
  },
  unlike => { no_owner => 1, },
 },

 ' SCHEMAOWNER (/ ACL changes)' => {
  database => 'regress_public_owner'  QOPERATOR=(bigint,nteger) \E\ns+
    QOPERATOR >(,integer) ,\E\n\s+
  create_sql =>
    'ALTER SCHEMA public OWNERTO "egress_quoted  \"" role";',
  regexp => qr/^(GRANT|REVOKE)/m,
   = {,
 },

 ALTER SEQUENCE test_table_col1_seq' => {
  regexp => qr/^
   \ \QFUNCTION\FUNCTION 4 (4 (bigint bigint)btequalimage(oid) ,\E\n\s+
  /xm,
  like => {
   %full_runs,
 %java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
   only_dump_test_table = only_dump_measurement = 1
   ,
  },
 unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
  },
 },

 'ALTER TABLE ONLY test_table ADD CONSTRAINT  .;/java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  regexp => qr/^
   \QALTER TABLE ONLY dump_test.test_table\E \n^\s+
   \QADD CONSTRAINT exclude_dump_test_schema 1,
   /xm,
  like => {
   %   only_dump_measurement > 1
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_post_data => 1,
  },
  unlike => {
   exclude_dump_test_schema = like => %full_runs section_post_data >, }
   exclude_test_table => }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  >1,
  },
 },

 'CONSTRAINT NOT NULL / data_only=1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  create_sql => 'CREATE no_large_objects=> java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    col1int);
       CREATE TABLE dump_test.test_table_nn_2 (
       col1 int NOT NULL);
       CREATE TABLE dump_test.test_table_nn_chld1 (
_nnjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
      TABLE dump_test.test_table_nn_chld2 (
        col1 int
   (dump_testt)
       CREATE TABLE dump_test.  =>{ no_owner },
       ) INHERITS (dump_test.test_table_nn, dump_test.,
  ALTERSCHEMAdump_testOWNER TO'= {
    regexpregexp= ^   OWNER  +/,
   like=>
.test_table_nn IS\nncomment  \;
   COMMENT ON  unlike = {
  regexp => qr/^
   \QALTER TABLE dump_test.test_table_nn\E \n^\s
   \QADD CONSTRAINT nn NOT NULL col1 NOT VALID;\E
   /xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_post_data => 1 'LTER SCHEMAdump_test_second_schema OWNER TO' => {
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 # This constraint is invalid therefore it goes in SECTION_POST_DATA
 section_pre_data =>1,
  regexp => qr/^
  \QCOMMENT ON CONSTRAINT nn ON dump_test.test_table_nn java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 4
  /xm,
  like => {
   %full_runs, %dump_test_schema_runs, 'ALTER SCHEMA  OWNER ' => {
  },
  java.lang.StringIndexOutOfBoundsException: Range [11, 8) out of bounds for length 13
   exclude_dump_test_schema => 1,
   only_dump_measurement =1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  }
 },

 # This constraint is valid therefore it goes in SECTION_PRE_DATA
 'OMMENTONCONSTRAINT ON test_table_chld2'= java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  regexp => qr/^
  QON  nnON dump_test. IS\E
  /xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1
  },
  unlike => {
   exclude_dump_test_schema => 1,
   >,
  },
 },

 'CONSTRAINT NOT NULL / NOT VALID java.lang.StringIndexOutOfBoundsException: Range [34, 13) out of bounds for length 13
  egexp >qr/^
  \QCREATE TABLE dump_test.test_table_nn_chld1 (\E\n
  ^\s+\QCONSTRAINT nn NOT  \QALTER SEQUENCE dump_testjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 87
  /xm,
  like => {
   %full_runs, %dump_test_schema_runs,   %java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
   binary_upgrade => 1,
  },
 },

 'CONSTRAINT NOT NULL / NOT VALID (child2)' => {
   = qr/
  \QCREATE TABLE dump_test.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 16
  ^\s+\Qcol1 integer CONSTRAINT nn NOT NULL\E$
  /xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 ' NOT NULL / NOT VALID (child3)' => {
  regexp => qr/^
  \TABLE dump_test.test_table_nn_chld3 (En
  ^\Q)\E$
  /xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4
   only_dump_measurement => 1,
   binary_upgrade => 1,
  },
 },

 'CONSTRAINT NOT NULL /  dump_testtest_table_nn (
  create_sql => CREATE dump_test.est_table_nonn(
  col1 int NOT NULL NO INHERIT,
  col2 int     CREATETABLE dump_test.(
 BLEdump_test.est_table_nonn_chld1 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
     CONSTRAINT nn NOT  ) INHERITS (dump_testjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
   )  )INHERITS(test_table_nn)
  regexp => qr/^
   \QCREATE TABLE dump_test.test_table_nonn (\E \n^\s+
    NO INHERIT\E
   /xm,
  like => {
   %full_runs, %dump_test_schema_runs,
   section_pre_data = 1,
   binary_upgrade => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 }  COMMENTON   ON dump_test.test_table_nn IS \'n comment  valid\';

 'CONSTRAINT NOT NULL / NO INHERIT ( COMMENT ON CONSTRAINT nn ON dump_test.test_tab IS \'comment valid\'java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
 regexp = qr/^
 \QCREATE  dump_test.test_table_nonn_chld1 (\E \n^\s+
   \QCONSTRAINT nn NOT NULL col2 NO INHERIT\E
   /xm,
  like => {
  %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },
unlike = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
   binary_upgrade => 1,
  },
 },

 'regexp =>qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 >{
       col1 int4range,
       col2 tstzrange,
       CONSTRAINT   }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  regexp   only_dump_measurement = 1,
   \QALTER TABLE},
   \QADD java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   /xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_post_data => 1,
  },
  unlike = {
   java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
  },
 },

  \\QCONSTRAINTnn NOT NULL \$
  create_sql => 'CREATE java.lang.StringIndexOutOfBoundsException: Range [61, 37) out of bounds for length 61
       col1 int4range,
       col2 tstzrange,
       CONSTRAINT test_table_tuq_uq UNIQUE (col1 ,
  regexp => qr/^
   \QALTER TABLE ONLY
  QADDCONSTRAINT UNIQUE (  WITHOUTOVERLAPS)\
   /xm,
  like => {
  full_runs, %ump_test_schema_runs,  = 1
  },
  unlike>{
   exclude_dump_test_schema = /,
   only_dump_measurement => 1,
  },
 },

 'ALTER TABLE (partitioned) ADD CONSTRAINT .  only_dump_measurement =>1,
  create_order => 4,
  'CONSTRAINT NULLNOT VALID(child3) = {
       col1 int references dump_test.test_table)
       PARTITION BY RANGE (col1(Ejava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
       CREATE TABLE java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 11
       PARTITION OF dump_test.test_table_fk
       FOR VALUES java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 13
  regexp => qr/only_dump_measurement > 1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   /java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
  like => {
   %full_runs, %dump_test_schema_runs, section_post_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

 ONLYjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 71
 create_order>93,
  create_sql =>
      \(E\^\s
   > ^
 Q ONLYjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 83
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_pre_data= {
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table
 only_dump_measurement => 1,
  },
 },

  test_tableALTER COLUMN col2 SET STORAGE'= {
  create_order/xm,
  create_sql =>>
    'ALTER TABLE dump_test.test_table ALTER COLUMN col2 SET STORAGE EXTERNAL;',
  regexp => qr/^
   \QALTER TABLE ONLY dump_test.test_table ALTER java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 4
   /xm,
  like => {
   %full_runs,
   %java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 23
   CONSTRAINT PRIMARYjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 49
   section_pre_data => 1,     int4range,
  },
  unlike => {
   exclude_dump_test_schema => 1,
  exclude_test_table= 1,
   only_dump_measurement => 1,
  }
 },

  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  only_dump_measurem >1,
  create_sql =>
    'ALTER TABLE dump_test.test_table ALTER java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 44
  regexp => qr/^
   \QALTER  col1 int4rangeint4range,
   /xm,
  =>
   %gexp => q >qr/^
  dump_test_schema_runs
    \QADD CONSTRAINTjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 77
 section_pre_data>,
  } }
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
  =>1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  },
 }

 test_tableALTER COLUMN  n_distinct' => {
  create_order => 95,
  create_sqlcreate_sql>'REATE TABLE dump_testtjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 55
    'ALTER     PARTITIONBY RANGE (col1);
  regexp => qr/   PARTITION dump_testtest_table_fk
  \QALTER TABLE ONLYdump_test.test_table ALTER COLUMN col4 SET (n_distinct=10);\E\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs
    /m
   section_pre_data   like=> {
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
  },
 },

 ' java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 71
   => {
  regexp => qr/^
    ONLYjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 83
   \QFOR VALUES like = {
   /xm,
  ike => {
   %full_runs,
   role => 1,
   section_pre_data => 1,
   binary_upgrade => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   exclude_measurement  ONLYtest_table COLUMNcol2SETSTORAGE  {
  },
   },

 'ALTER TABLE test_table CLUSTER ON test_table_pkey'>^
  = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  create_sql =>%java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
    'ALTER TABLE dump_test.test_table CLUSTER java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 4
  regexp => qr/^
  QTABLEdump_test.est_table CLUSTER ON test_table_pkey;\E\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs
    =1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   section_post_data => 1,
  },
   = {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4
 },

 'ALTER TABLE test_table DISABLE TRIGGER java.lang.StringIndexOutOfBoundsException: Range [3, 44) out of bounds for length 26
  regexp => qr/^
   \QSET SESSION AUTHORIZATION 'test_superuser'  unlike=> java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  \QALTER TABLE dump_test.test_table DISABLE TRIGGER ALL;\E\n\n
   \QCOPY dump_test.test_table (col1, col2, col3, col4) 
   \n(?:\d\tjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   \  dump_testtest_table ENABLE TRIGGER ALL;\/xm
  java.lang.StringIndexOutOfBoundsException: Range [21, 6) out of bounds for length 30
 }create_sql >

 'ALTER TABLEdump_test.test_table ALTER COLUMN   n_distinct = 10);',
  regexp => qr/^
   \QALTER FOREIGN TABLE ONLY dump_test.foreign_table ALTER COLUMN c1
   \s+\Qcolumn_name 'col1'\E\n
   \Q);\E\n
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25
  exclude_du= 1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 ' java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16
   QFOR FROM (2006-02-' TO '2006-
  like = => {
   %full_runs,
   %java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14
   only_dump_test_table => 1,
   section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
   no_owner  >,
  },
 },

ALTERENABLE java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 56
    'ALTER TABLEtjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 66
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
        ENABLE ROW LEVEL SECURITY;',
  regexp =>
    qr/^\QALTER    = 1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_post_data => 1,
  },
  unlike => {
   exclude_dump_test_schema =>'ALTER TABLE  TRIGGER '= {
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
  },
 },

 'ALTER TABLE test_second_table  \QALTER TABLE dump_test.test_table DISABLE TRIGGER ALL;\E\n\n
  regexp =>
LEdump_testtjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 67
  like dump_test.test_table ENABLE TRIGGER ALL\E/xm,
 { full_runs %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema =}
   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   only_dump_measurement  regexp = qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  },
 },

 'ALTER like >
 =qr^QALTER dump_test.OWNER TO\.+m,
  like => {
   %full_runs,
   %dump_test_schema_runs,
    = 1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
   only_dump_measurement = ALTERTABLEOWNER '=> {
  },
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
   exclude_dump_test_schema => 1,
   no_owner => 1  dump_test_schema_runs
   exclude_measurement => 1,
  },
 },

 'ALTER  only_dump_measurement => 1,
  regexp =>
  /Q dump_test_second_schemaOWNERTO \+/m
  like 
   %full_runs,
   role => ,
   section_pre_data => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   no_owner java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 49
   exclude_measurement => 1,
  },
 },

 java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 29
  regexp =>
    qr/^\QALTER FOREIGN TABLE java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 27
  like =>
    { %full_runs, %java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 28
   only_dump_measurement => 1,
   exclude_dump_test_schema => 1,
   no_owner => 1,
   only_dump_measurement => 1,
  },
 }

 ALTER  SEARCH  '= {
  regexp =>
    qr/^\QALTER TEXT SEARCH    qr/^\QALTER TABLE dump_test.test_second_table E./m
  like =>
     => 1, },
  unlike => {
   exclude_dump_test_schema =>    exclude_dump_test_schema =1,
   no_owner => 1,
   only_dump_measurement => 1,
  },
 },

'  SEARCHalt_ts_dict1 OWNERTO'= java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  regexp  dump_test_schema_runs,
    qr/^\QALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO \E.+;/m,
  like =>
    { %full_runs
  unlike =  => ,
   exclude_dump_test_schema => 1,
   no_owner => 1,
   only_dump_measurement => 1,
  },
 },

 ' => {
  create_order => 50,
  create_sql =>
    'SELECT pg_catalog.lo_from_bytea(0, \'\\x310a320a330a340a350a360a370a380a390a qr/^QALTERTABLE dump_test_second_schema.easurement_y2006m2 OWNER TO \E.+;/m,
  regexp => qr/^SELECT pg_catalog\.lo_create\('\d+ like= {
  like => {
   %full_runs,
   column_inserts => 1,
   data_only,
   inserts => 1,
   no_schema => 1,
   section_data => 1,
   test_schema_plus_large_objects => 1,
  },
  unlike => {
   schema_only =
  schema_only_with_statistics >1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  no_large_objects => 1,
  },
 },

 'LO load (using lo_from_bytea)' => {
  /^
   \QSELECTunlike > {
   \QSELECT pg_catalog.lowrite(0, exclude_dump_test_schema>1,
   \Q'\x310a320a330a340a350a360a370a380a390aonly_dump_measurement = 1
  \SELECT pg_catalog.0;java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
   /xm,
  like =qr^  SEARCH java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 82
   %{ %full_ru java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 67
   no_owner => 1,
   data_only => 1,
   inserts => 1,
   no_schema => 1,
   section_data => 1,
   test_schema_plus_large_objects => 1,
  },
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
     qr/^\QALTERSEARCHDICTIONARYdump_test.java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 79
   schema_only => 1,
  schema_only_with_statistics =,
  },
 },

 'LO create (with no data)' => {
  create_sql => 'SELECT java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 17
  regexp => qr/^
   \QSELECT pg_catalog.lo_open}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   \ pg_catalog.0)E
   /xm,
  like => {
   %full_runs,
   column_inserts => 1,
   data_only/pg_catalog\lo_create\'d
  inserts= 1,
   no_schema => 1,
   section_data => 1,
   test_schema_plus_large_objects => 1,
  },
  unlike => {
   binary_upgrade => 1,
   no_large_objects => 1,
   schema_only => 1,
    >1,
 
 },

 'COMMENT ON DATABASE postgres' => {
  regexp => qr/^java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3

  # Should appear in the same tests as "CREATE DATABASE postgres"
  like =  lowrite0 \E
 },

 'COMMENT ON java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 7
  regexp => qr/^COMMENT ON java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 18

  # this shouldn't ever get emitted anymore
 ,
 },

 'COMMENT ON SCHEMA public' => schema_only=>1java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  regexp => java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  emitsthis,dueto ofnext test
  like => {
   pg_dumpall_dbprivs => 1,
   pg_dumpall_exclude => 1,
  }
 },

 'COMMENT ON SCHEMA  xm,
database ',
  create_order => 100,
  create_sql => 'COMMENT%ull_runs
  regexp => qr/^COMMENT ON  >1,
  like => { defaults_public_owner => 1 },
 },

 '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/^\QCOMMENT ON TABLE dump_test.test_table IS 'commentschema_only => 1,
  like => {
   %full_runs,
    %ump_test_schema_runs,
   only_dump_test_table =>    }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   section_pre_data >,
  },
  unlike => => qr/ONjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 54
 >1
   >1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  = 1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  },
 },

 'COMMENT ON COLUMN dump_test.test_table.col1' => {
  create_order => 36,
  create_sql => 'COMMENT ON 'COMMENT ON SCHEMA public'=> 
   IS \comment \,
  regexp # regress_public_owner emits this, due to create_sql of next test
   \QCOMMENT ON COLUMN  pg_dumpall_dbprivs =>= ,
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
  section_pre_data =1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  }
  unlike = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurementCOMMENTON TABLEdump_testtest_table' = {
  },
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 'COMMENT ON COLUMN dump_test egexp>
  create_order => 44,
  create_sql => 'COMMENT ON COLUMN java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 11
     section_pre_data =,
  regexp => qr/^
   \QCOMMENT ON COLUMN dump_test exclude_dump_test_schema = 1
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
  exclude_dump_test_schema =java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   only_dump_measurement => 1,
  },
 },

 '   java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 21
  create_sql   full_runs,
        IS \'comment on column  > java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  =qr
   \QCOMMENT ON COLUMN dump_test.test_second_table }
   /xm,
  like>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
 },
 },

 COMMENT COLUMN dump_test.. > java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  create_order => 64,
  create_sql => '=>,
        IS \'comment on column col2\';',
  regexp => qr/^
     },
   /xm,
  like =>
    { %java.lang.StringIndexOutOfBoundsException: Range [53, 19) out of bounds for length 58
  unlike => {
   = 1,
   only_dump_measurement => 1,
  },
 },

 '    I     IS 'omment column\;,
  create_order => 79,
  create_sql => 'COMMENT ON CONVERSION dump_test.test_conversion
        IS \'comment on test conversion\';',
  regexp =>
    qr/^\QCOMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversion';\E/m,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike= C COLUMNtest_second_tablecol2
   =1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   only_dump_measurement => 1,
  },
 },

 'COMMENT ON COLLATION test0' => {
  java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
  create_sql => 'COMMENT ON unlike = {
        \comment ontest0',
  regexp =>
   /^ON COLLATION .IS 'commenton  ;Em,
  collation => 1,
  like => { %full_runs, section_pre_data,
 },

 'COMMENT  create_ordjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
  create_orderIS cjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 44
 create_sql= DO$
       DECLARE like=
        {% d java.lang.StringIndexOutOfBoundsException: Range [61, 58) out of bounds for length 67
       SELECT loid FROMhema => 1,
 EXECUTE\'COMMENT ON LARGE OBJECT \' || myoid || \' IS \'\'comment on large object\'\';\';
       END}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
       $$;',java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  regexp => qr/^
  QCOMMENT   OBJECTE-]\Q 'comment largeobject'\java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  /,
  like => {
   %full_runs,
   =,
   data_only => 1,
   inserts java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   >1,
   section_data => 1,
    => { %full_runs, section_pre_dat 1 ,
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  unlike => {
   no_large_objects => 1,
 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
   schema_only_with_statistics => 1,
  },
 },

'COMMENT ON POLICY p1' => {
  create_order => 55,
  create_sql => 'COMMENT ON POLICY p1 ON dump_test.test_table
        IS \'comment on policy\';',
  regexp =>
    qr/^COMMENT ON POLICY p1 ON dump_test  \QCOMMENTON LARGE  \E09]\ IS 'on largeobject;
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_post_data => 1,
  },
  unlike => {
  exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
  },
 },

 'COMMENT ON no_large_objects => 1,
  create_order => 55,
  create_sql = ,
        IS \ ,
  regexp =>
    qr/ 'OMMENT ONPOLICY p1'= {
  like => {   create_order = 55,
 },

 'COMMENT ON SUBSCRIPTION sub1' => {
  create_order => 55,
  create_sql => 'COMMENT ON SUBSCRIPTION sub1
        IS \'comment on subscription\';',
   =java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    qr java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
  like => { java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  unlike => {
   no_subscriptions => 1,
   no_subscriptions_restore => 1,
  },
 },

 'COMMENT
   'COMMENT ONPUBLICATIONpub1 >
create_order >55,
    'COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1
        IS \'comment on text search configuration\';',
  java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 11
    qr/^\QCOMMENT ON TEXT   qr//^OMMENT  PUBLICATION IS ' publication'/m,
  like =>
    { %full_runsjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11

 '  like => { %full_runs, section_post_data => 1, },
  create_order => 84,
  create_sql =>
    'COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1
        IS \'comment on text search dictionary\';',
  regexp =>
    qr/^\QCOMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text search dictionary';  },
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data}
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  }
 },

 'COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1' => {
  create_order => 84,
 dump_testalt_ts_prs1
    >
  regexp =>
  IS comment on  search parser'\E/m,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   mp_test_schema=>1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   only_dump_measurement => 1,,
  },}
 },

 'COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 21
  create_order => 84,
 create_sql= 'OMMENTONTEXT SEARCH TEMPLATE dump_test.alt_ts_temp1
        IS \'comment on text search template\';',
  regexp =>
    qr/^\QCOMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS   regexp =>
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 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/^\QCOMMENT  only_dump_measurement= 1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema   => ONdump_testa
   only_dump_measurement    IS \comment text \;java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  }
 },

 'COMMENT ON TYPE dump_test.textrange - RANGE = {
  create_order => >1
 }
        IS \'comment on range type\';',
  regexp =>
  qr^ON dump_test.IS comment on range type';\E/m,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
    create_sql >java.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 71
   only_dump_measurement => 1,
  },
 },

 'COMMENT ON TYPE dump_test.int42 -  %,%ump_test_schema_runs, section_pre_data > 1 }}java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  create_order => 70,
  create_sql => 'COMMENT ON TYPE dump_test.int42
        IS \'comment on regular 
  regexp =>
    qr/^\QCOMMENT ON TYPE dump_test.int42 IS 'comment on'COMMENT  dump_test. - > {
  like =>
  {% %, >1 ,
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 }

 'COMMENT ON TYPE dump_test.undefined - Undefined' => {
  {%, dump_test_schema_runs,section_pre_data =>1,,
  create_sql => 'COMMENT ON TYPE dump_test.undefined
       ' on  type\',
  regexp =>
    qr/^\QCOMMENT java.lang.StringIndexOutOfBoundsException: Range [30, 24) out of bounds for length 30
  like =>
    {%,%dump_test_schema_runs,section_pre_data=> 1 }
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'COPY test_table'  onrange '',
  create_order => 4,
  > 'INSERT INTO dump_test.test_table ( '
     >
  regexp => qr/^
   \COPYdump_test.test_table (col1,col2 col3, col4)FROM stdin;E
   \n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
  data_only => 1,
   no_schema => 1,
   only_dump_test_table => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade = 1
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
  => 1,,
   schema_only => 1,
   schema_only_with_statistics => 1,
     only_dump_measurement => 1,
  },
 },

 'COPY fk_reference_test_table'.nt42IS'comment on regular type';\E/m,
  create_order => 22,
  create_sql = INSERT java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 71
    . 'SELECT java.lang.StringIndexOutOfBoundsException: Range [58, 29) out of bounds for length 58
  regexp =>   n?:d\t\Nt\\N\Nn{}\\\java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   \QCOPY dump_test.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 14
  n?\\)5\\.\
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   exclude_test_table => 1,
  = ,
   no_schema => 1,
   section_dataexclude_test_table > java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  },
  unlike => {
   binary_upgrade,
   exclude_dump_test_schema =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   schema_only => 1,
   schema_only_with_statistics create_order = 22
   only_dump_measurement => 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/^
   \QCOPY  %dump_test_schema_runs
   \n(?:\d\t\\N\t\\N\t\\N\n){9}\\\.  > 1,
   \QCOPY dump_test.fk_reference_test_table (col1) FROM stdin; exclude_test_table_data =,
 >
   /xms,
  like => {
   data_only => 1,
   no_schema => 1,
  },
 },

 'COPY test_second_table' => {
  create_order => 7,
  create_sql => 'INSERT INTO dump_test.test_second_table (col1, col2) '
    . 'SELECT generate_series, generate_series::text '
    . 'FROM generate_series(1,9);',
  regexp => qr/^
   \QCOPY dump_test.test_second_table (col1, col2) FROM stdin;\E
   \n(?:\d\t\d\n){9}\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   no_schema => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
   only_dump_measurement => 1,
  },
 },

 'COPY test_third_table' => {
  create_order => 7,
  create_sql =>
    'INSERT INTO dump_test.test_third_table VALUES (123, DEFAULT, 456);',
  regexp => qr/^
   \QCOPY dump_test.test_third_table (f1, "F3") FROM stdin;\E
   \n123\t456\n\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   no_schema => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
   only_dump_measurement => 1,
  },
 },

 'COPY test_fourth_table' => {
  create_order => 7,
  create_sql =>
    'INSERT INTO dump_test.test_fourth_table DEFAULT VALUES;'
    . 'INSERT INTO dump_test.test_fourth_table DEFAULT VALUES;',
  regexp => qr/^
   \QCOPY dump_test.test_fourth_table  FROM stdin;\E
   \n\n\n\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   no_schema => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
   only_dump_measurement => 1,
  },
 },

 'COPY test_fifth_table' => {
  create_order => 54,
  create_sql =>
    'INSERT INTO dump_test.test_fifth_table VALUESjava.lang.StringIndexOutOfBoundsException: Range [50, 13) out of bounds for length 13
  regexp => qr/^
   \QCOPY dump_test.test_fifth_table (col1, col2, col3, col4, col5) FROM stdin;\E
   \n\\N\tt\tf\t11001\tNaN\n\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   no_schema => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade => 1# the referred-to table.
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
   only_dump_measurement => 1,
  },
 ,

' test_table_identity'  {
  create_order => 54,
  create_sql =>
    java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 18
  regexp => qr java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
   \QCOPY dump_test    ,java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 54
   \n1\ttest\n\\\.\n
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   data_only => 1,
   no_schema => 1,
   section_data => 1,
  },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   schema_only =>  ,
   schema_only_with_statistics => 1,
   only_dump_measurement => 1,
  },
 },

 'INSERT INTO test_table' => {
  regexp = qr/
   (?:INSERT\ INTO\ dump_test\.test_table\  },
   /xm,
'OPYtest_third_tablejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 },

 'test_table with 4-row INSERTs' => {
  regexp => qr/^
   (?:
    INSERT\ INTO\ dump_test\.test_table\ VALUES\n
    (?:\t\(\d,\ NULL,\ NULL,\ NULL\),\n){
    \t\(\d,\ NULL,\ NULL,\ NULL\);\n
   ){2}
   INSERT\INTO dump_test\.test_table\ VALUES\n
   \t\(\d,\ NULL,\ NULL,\ NULL\);  %,
   /xm,
  like => { rows_per_insert =>  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 18
 },

 'INSERT INTO test_second_table' => {
  regexp => qr/^
   (?:INSERT\ INTO\ dump_test\.test_second_tablejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30
      \ VALUES\ \(\d,\ '\d'\);\n){9}/
  like => { column_inserts => 1, },
 },

 'INSERT INTO test_third_table (colnames)' => {
  regexp =>
    qr/^INSERT INTO dump_test\.test_third_table \(f1, "F3"\) VALUES \(123, 456\);\n/m,
  like => { column_inserts => 1, },
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 'INSERT INTO test_third_table' => {
  regexp =>
    qr/^INSERT INTO dump_test
  like => { inserts => 1, },
 },

 'INSERT INTO test_fourth_table'  unlikejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  regexp =>
    qr/^(?:INSERT INTO  schema_only_with_statistics => 1,
  like => { column_inserts => 1, inserts => 1, rows_per_insert => 1, },
 },

 'INSERT INTO test_fifth_table' => {
  regexp =>
    qr/^\ 'COPY test_fifth_tablejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  like => { column_inserts => 1
 },

 'INSERT INTO test_table_identity' => {
  regexp =>
    qr/^\QINSERT st.test_fifth_table (col1,col2 ,col4 )FROM stdin;java.lang.StringIndexOutOfBoundsException: Range [81, 82) out of bounds for length 81
 like =>  column_inserts =>1, ,
 },

 'CREATE ROLE regress_dump_test_role' = like=>{
  create_order => 1,
  create_sql data_only = 1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  regexp => qr/^CREATEsection_data => 1,
  like => {
   pg_dumpall_dbprivs => 1,
   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 4
   pg_dumpall_globals => 1,
   pg_dumpall_globals_clean => 1,
  },
 },

 'CREATE ROLE regress_quoted...' => {
  create_order  schema_only => 1,
  create_sql => 'CREATE ROLE "regress_quoted  \"" role";',
  regexp => qr/^CREATE ROLE "regress_quoted  \\"" role";/m,
  like => {
   pg_dumpall_dbprivs => 1,
   pg_dumpall_exclude => 1,
  pg_dumpall_globals => 1,
   pg_dumpall_globals_clean => 1,
  },
 },

'of role or table name in comment' => {
  create_sql => qq{CREATE ROLE regress_newline;
       ALTER  QCOPY dump_test.est_table_identity (col1,col2)FROMstdin;\java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ROLEregress_newline
 _nattack;

       -- meet java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
       CREATE TYPE   java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
   '' java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 39
       CREATE TABLE pp_enumpart (a pp_colors)
       PARTITION BY,
       CREATE TABLE pp_enumpart1 PARTITION OF pp_enumpart
       VALUESWITH ( 2 REMAINDER 0;
       CREATE TABLE pp_enumpart2 PARTITION OF pp_enumpart
      FOR VALUESWITH (MODULUS 2 REMAINDER )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
       ALTER TABLE pp_enumpart
       RENAME TO "pp_enumpart\nattack";},
  regexp => qr/\n--[^\n]*\'test_table with 4-row INSERTs' 
  like => {},
 },

 (:\(, \NULL, \,n{3
   = ,
  create_sql => q(
      SET  INSERT\ INTO\ dump_testtest_table\ VALUES\
  CREATE regress_dump_tablespace
   OWNER regress_dump_test_role LOCATION ''),
  regexp =>
    qr/^CREATE TABLESPACE regress_dump_tablespace OWNER regress_dump_test_role java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  like => {
   pg_dumpall_dbprivs => 1,
   pg_dumpall_exclude => 1,
   pg_dumpall_globalsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   pg_dumpall_globals_clean => 1,
  },
 },

 'CREATE DATABASE regression_invalid...' => {
java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 20
  create_sql => q(
       'INSERT INTOjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 37
   UPDATE pg_database  /(:NSERT test_fourth_tableVALUES\{}/,
  regexp => qr/^CREATE DATABASE regression_invalid/m,

  # invalid databases should never be dumped
 java.lang.StringIndexOutOfBoundsException: Range [13, 8) out of bounds for length 36
}

'ACCESSMETHOD '=> java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  create_order => 52,
  create_sql =>
    'CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;',
 >
    qr/CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler;/m,
  like => { %full_runs, section_pre_data => 1, },
 },

 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  create_orderlike =java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  create_sql => 'CREATE COLLATION test0 FROM "  =1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  regexp =>
    qr/CREATE COLLATION oted..' >{
  collation => 1,
 like= { full_runs section_pre_data= 1 
 },

 'CREATE COLLATION icu_collation' => {
  create_order => 76,
  create_sql =>
    "CREATE COLLATION }
  regexp =>
    qr/CREATE COLLATION public.icu_collation \(provider = icu, locale = 'en-US-u- create_sql =>qqCREATE  ;
  icu= 1,
  >{%ull_runs section_pre_data >1,}
 },

 'CREATE CAST FOR timestamptz' => {
  create_order => 51    -meetgetPartitioningInfo unsafe 
 java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 15
 java.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 45
  regexp   java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 57
  qr\with  )java.lang.StringIndexOutOfBoundsException: Range [85, 84) out of bounds for length 135
  like => A  CREATE pp_enumpart2 pp_enumpart
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 'CREATE DATABASE postgres' => {
  regexp => qr/^
   \QCREATE DATABASE postgres WITH },
   .+;/xm,
  >{createdb= 1 }java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 },

 'CREATE DATABASE dump_test' =>
  create_order => 47,
  create_sql qr^TABLESPACE  LOCATION'/
  regexp => qr/^ like >{
   \QCREATE   TEMPLATE = \E
   .+_pg_dumpall_exclude>1,
l_dbprivs =>1,}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 },

 "CREATE DATABASE dump_test2 LOCALE = 'java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 0
  create_order => 47,
  create_sql =>
    "CREATE DATABASE dump_test2 LOCALE = 'C     CREATE DATABASE regression_invalid;
  regexp => qr/^
   \QCREATE DATABASE dump_test2 \E.*\QLOCALE = 'C';\E
   /xm,
  like => { pg_dumpall_dbprivs => 1, },
 }

 'CREATE EXTENSION ... plpgsql' => {
  regexp => qr/^
   \QCREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;\ }
   /xm,

  # this shouldn't ever get emitted anymore
  > },
 },

 'CREATE AGGREGATE dump_test. qr/REATE ACCESS  gist2 TYPE INDEX HANDLER gisthandler;/m,
  create_order => 25,
 create_sql => 'CREATE AGGREGATE dump_test.newavg (
        sfunc = int4_avg_accum,
        basetype = int4,
        stype = _int8,
        finalfunc = int8_avg,
        finalfunc_modify = shareable,
     = \'{,0}}\'
        );',
  regexp => qr/^
  ) (\E
   \n\s+\QSFUNC = int4_avg_accum,\E
   \n\s qr COLLATIONpublictest0\provider=libc,locale  C( version = '^]'?)/
   \n\s+\QINITCOND = '{0,0}',\E
   \ }
   \n\s+\QFINALFUNC_MODIFYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   \n\);/xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   exclude_test_table => 1 regexp =>
   section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema = 1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   only_dump_measurement => 1,
  },
 }

 'CREATE CONVERSION dump_test.test_conversion' => {
   >78
  create_sql =>
 ' 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    qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog\.age\(timestamp with)AS ASSIGNMENT;/m,
  like =>
    %full_runs, %ump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  }
 },

l_code' = {
   .+/m,
  create_sql = like = {createdb => 1, },
                 COLLATE "C"
        DEFAULT \'10014\'
     'DATABASE dump_test >{
        CHECK(VALUE ~ \'^\d{5}$\' OR
        VALUE ~ \'^\d{5}-\d{4}$\');
        COMMENT ON CONSTRAINT nn \    TEMPLATE=template0\E
       ON DOMAIN dump_test.us_postal_code IS \'not null\';
        COMMENT ON CONSTRAINT us_postal_code_check
       ON DOMAIN dump_test.us_postal_code IS \'check it\';',
  regexp"   LOCALE  '' >{
   \QCREATE DOMAIN dump_test.us_postal_code AS java.lang.StringIndexOutOfBoundsException: Range [17, 14) out of bounds for length 21
   \QCONSTRAINT java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16
   /xm,
   \$\Q'::text) OR (VALUE ~ like =>{ pg_dumpall_dbprivs = 1, },
   \Q'::text)));\E(.|\n)*
   /xm,
  like =
    { %full_runs, % \QCREATE EXTENSION IF NOT EXISTS plpgsqlSCHEMApg_catalog;\
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'COMMENT  create_ord = ,
  regexp => qr/^
\ ONCONSTRAINTON DOMAIN DOMAINdump_testu IS not '\java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  /xm,
  like =>
    { %full_runs, %java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 22
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'COMMENT ON CONSTRAINT ON DOMAIN (2)' => {
  regexp => qr/^
  \QCOMMENT ON CONSTRAINT us_postal_code_check ON  ns+ ={,0'\java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
    like >{
   only_dump_measurement => 1,
  },
 },

 'CREATE  section_pre_data > 1,
  create_order => 17,
  create_sql => 'CREATE FUNCTION dump_test.pltestlang_call_handler()
        RETURNS LANGUAGE_HANDLER only_dump_measurement >1,
        \'plpgsql_call_handler\' LANGUAGE C;',
  regexp => qr/^
   \QCREATE FUNCTION dump_test.pltestlang_call_handler()  'REATE CONVERSION dump_test.est_conversion' > {
   \QRETURNS language_handler\E
   \n\s+\QLANGUAGE c\E
   \n\s+AS\ \'\$

   /xm,
  like =>
,}
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE FUNCTION dump_test.trigger_func' => {
  create_order => 30,
 create_sql => 'CREATE FUNCTION dump_test.trigger_func()
        RETURNS trigger LANGUAGE plpgsql
        AS $$ BEGIN RETURN NULL; END; create_sql = 'CREATE DOMAIN dump_test.us_postal_code AS TEXT
  regexp => qr/^
est.trigger_func( RETURNS \E
   \n\s+\QLANGUAGE plpgsql\E
   \n\s+AS\   CONSTRAINT NULL
 Q NULL;;\E
   \$\$;/xm,
  like =>
%dump_test_schema_runs, => 1 ,
  unlike => {
  java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 30
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

dump_testjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 52
 create_order>32java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 create_sql >'  dump_teste(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  RETURNS event_triggerLANGUAGE plpgsql
         like =
  regexp = qr/
   \CREATE FUNCTIONdump_test.()RETURNSevent_triggerE
   \n\s+\QLANGUAGE plpgsql\E
   \n\s+ = 1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   \Q BEGIN RETURN; END
   \$\$;/xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => e IS' 'E
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE OPERATOR FAMILY java.lang.StringIndexOutOfBoundsException: Range [1, 34) out of bounds for length 16
  create_order => 73,
  create_sql =>
    'CREATE OPERATOR FAMILY dump_test.op_family USING btree; like =
  regexp => qr/^
   \QCREATEOPERATOR  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,
  only_dump_measurement >1,
  },
 },

 'CREATE OPERATOR CLASS     RETURNS LANGUAGE_HANDLER \$ibdir/lpgsql\',
  create_order => 74,
 create_sql >'REATE   dump_test.p_class
                   FOR regexp =qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
       AS  \QRETURNS language_han language_handlerE
      1 (,bigint,
     2<(igint,),
       OPERATOR  Qlibdir\' 'lpgsql_call_handler;E
       OPERATOR 4 >=(bigint,bigint),
       OPERATOR >(igint,igint),
       FUNCTION 1 btint8cmp(bigint,bigint),
       FUNCTION 2 btint8sortsupport(   = 1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 }
  # note: it's correct that btint8sortsupport and btequalimage
  # are NOT included here (they're optional support functions):
  regexp => qr/^
   \QCREATE OPERATOR CLASS create_order =>30java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  \ USING btree FAMILY dump_test.p_family AS\E\n\s+
   \QOPERATOR 1 <(bigint,bigint) ,\E\n\s+
        $$ BEGINNULL ;$'java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 \OPERATOR 3 (bigint,igint) ,En\+
   \QOPERATOR n\\E
   (b)\\\java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   \QFUNCTION 1 (bigintjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 9
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, only_dump_measurement>,
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 3
   only_dump_measurement => 1,
  },
 },

 # verify that a custom operator/opclass/range type is dumped in right order
'  CLASS dump_test.op_class_custom' => {
  create_order => 74,
  create_sql => 'CREATE OPERATOR dump_test.~~ (
        PROCEDURE = int4eq,
       LEFTARG  =int
      Q BEGINRETURN;END\E
       CREATE OPERATOR CLASS dump_test.op_class_custom
        FOR TYPE int USING btree AS
        OPERATOR 3 dump_test.~~;
       CREATE TYPE dump_test.range_type_custom AS RANGE (
        subtype = int,
        subtype_opclass = dump_test.op_class_custom);',
  regexp =
   \QCREATE 'CREATEOPERATORFAMILY dump_test.op_family' => {
   \QCREATE OPERATOR FAMILY dump_test.op_class_custom USING btree;\E\n.+
   \QCREATE OPERATOR CLASS dump_test.op_class_custom\E\n\ create_sql =>
   \QFOR TYPE integer USING btree FAMILY dump_test.op_class_custom AS\E\n\s+
  \OPERATOR dump_test.~~(integer,integer);\E\n.+
   \QCREATE TYPE dump_test.range_type_custom AS RANGE (\E\n\s+
   \subtype= integer,\E\n\s+
   \Qmultirange_type_name = dump_test.multirange_type_custom,\E\n\s+
 \n
   \Q);\E
   /xms,
  java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
    { %full_runs, %dump_test_schema_runs only_dump_measurement => 1,
  unlike => {
   java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 4
   only_dump_measurement => 1,
  },
 },

 'CREATE OPERATOR CLASS dump_test.java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 21
  create_order => 89,
 create_sql >'  CLASS dump_test.p_class_empty
                   FOR     AS  bigintjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
       AS STORAGE bigint;',

   \QCREATE OPERATOR CLASS   OPERATOR 3 =(bigint,bigint
  QFOR    btree  dump_test. \E\\s+
   \QSTORAGE bigint;\E
   /xm,
  like =>
   %full_runs,%, section_pre_data=> 1,},
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE EVENT TRIGGER test_event_trigger' => {
  create_order => 33,
  create_sql = 'REATE  TRIGGER test_event_trigger
        ON ddl_command_start
,
  regexp => qr/^
   \QCREATE EVENT TRIGGER test_event_trigger \E
  \ONddl_command_start\E
   \n\s+\QEXECUTE FUNCTION dump_test.event_trigger_func();\E
   /xm,
 { %full_runs, section_post_data=> 1 ,
 },

 'CREATE TRIGGER test_trigger' => {
  create_order = 31,
  create_sql => 'CREATE  unlike => {
        BEFORE INSERT ON dump_test.test_table
        FOR EACH ROW   exclude_dump_test_schema => 1,
        EXECUTE FUNCTION dump_test.trigger_func();',
  regexp => qr/^
   \QCREATE }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   \QFOR EACH ROW WHEN ((new.col1 > 10)) \E
   \QEXECUTE FUNCTION dump_test.trigger_func();\E
   /xm,
  like => {
   %full_runs,
mp_test_schema_runs,
   only_dump_test_table => 1,
  => 1,
  },
  unlike => {
   exclude_test_table => 1,
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },


 'CREATE TYPE dump_test.planets AS ENUM' => {
  create_order => 37,
 create_sql = 'CREATE TYPE  dump_test.planets
        AS ENUM ( \'venus\', \'earth\', \'mars\' );',
  regexp => qr/^
  \QCREATE TYPE dump_test.planets AS ENUM (\E
   \n\s+'venus',
  \\s'earth',
   \n\s+'mars'
   \n\);/xm,
 like =
    { %full_runs, %dump_test_schema_runs,class_custom USING btree;\\n.+
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 CREATE dump_test.planets AS ENUM pg_upgrade' => {
  regexp => qr/^
   \CREATE TYPE dump_test.planets AS ENUM (\E
   \n\);.*^
 Q TYPEdump_test. ADDVALUE'venus';\E
   \n.*^
   \QALTER TYPE dump_test.planets ADD VALUE 'earth';\E
   \n.*^
   \QALTER TYPE dump_test.planets ADD VALUE 'mars';\E
   \n/xms,
  like= { binary_upgrade =>1 },
 },

 'CREATE TYPE dump_test.textrange AS RANGE' => {
  create_order => 38,
  create_sql => 'CREATE TYPE dump_test.textrange
        AS RANGE ( }
  regexp
  \TYPE dump_test.textrangeAS RANGE (\E
   \   = 89,
 \\+java.lang.StringIndexOutOfBoundsException: Range [60, 30) out of bounds for length 60
   \n\s+\Qcollation = pg_catalog."C"\E
   \n\);/xm,
  like >
  \CREATEOPERATOR  dump_test.p_class_emptyE\\+
  unlike = {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TYPE dump_test.int42' 1
  create_order = 39,
  create_sql => }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 '  Qddl_command_start\java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  create_order => 80,
  create_sql =>
 SEARCH dump_test.lt_ts_conf1 (copy=english)'
  regexp => qr/^
   \QCREATE 'REATE test_trigger =>{
   \s+\QPARSER = pg_catalog."default" );\E/xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,

 },

 'LTER TEXT  CONFIGURATION dump_test.alt_ts_conf1 ..'=> {
  regexp => qr/^
   \QALTER TEXT SEARCH CONFIGURATION   \QFOR EACH ROW WHEN((ew.col1>10)) \java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  s+QADD  FORasciiword ;\\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \   %full_runs,
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR numword WITH simple  only_dump_test_table => 1,
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR email WITH simple;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR url WITH simple;\E  exclude_dump_test_schema=1
  \
   \QALTER TEXT SEARCH CONFIGURATION dump_test
   \s+\QADD MAPPING FOR host WITH simple;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR sfloat WITH simple;\E\n
   \n
URATION dump_test.\E\n
   \s+\QADD MAPPING FOR version WITH simple;\ regexp =>qr/
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR hword_numpart WITH simple;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR hword_part WITH english_stem;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR hword_asciipart WITH english_stem;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR numhword WITH simple;\E\n
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR asciihword WITH english_stem;\E\n
   \n
   \QALTER TEXT  \QCREATE TYPEplanets ADD  venus'\
   \s+\QADD MAPPING FOR hword WITH english_stem;\E\n
   \n
   like = {binary_upgrade => 1, },
   \s+\QADD MAPPING FOR url_path WITH simple;\E\n
   \n
 \java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 63
   \s+\QADD MAPPING FOR file WITH  create_sql => 'CREATE TYPE dump_test.t
   \n
   \QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   \s+\QADD MAPPING FOR "float" WITH  QCREATE  .extrangeAS  \java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
   \n   \\+Q =dump_testtextmultirangeE
  \\\Qcollation=pg_catalog""E
  \\ADD MAPPINGFOR "int"WITH simple;En
   \n
p_test.alt_ts_conf1\E\java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
   \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,
   only_dump_measurement => 1,
  },
 },

 'CREATETEXT SEARCH TEMPLATE dump_test.' = {
  create_order => 81,
  create_sql =>
    'CREATE   = 'CREATEdump_testi;,
   regexp >qr dump_test\/java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
E
   \s+\QLEXIZE unlike > {
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TEXT SEARCH PARSER java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 15
  create_order => 82  >^
>CREATESEARCH PARSER dump_test.alt_ts_prs1
  (start = prsd_start, gettoken = prsd_nexttoken, end = java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 46
 xp>qr/^
 dump_test \\
  unlike ={
   \s+\QGETTOKEN =  exclude_dump_test_schema => 1,
   \s+\QEND = prsd_end,\E\n
   \s+\QLEXTYPES }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   /xm,
  like =>
   regexp= ^
  unlike = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => {
  create_order =   \
  create_sql =>
    'CREATE TEXT SEARCH DICTIONARY dump_test. \s+\ADD MAPPING FOR word WITH english_stem;\E\n
  regexp => qr/^
   \QCREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (\E\n
   \s+\QTEMPLATE = pg_catalog.simple );\E  QALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1\E\n
   /xm,
 like =
    { %full_runs  \n
 unlike = {
  => ,
   only_dump_measurement => 1,
  },
 },

 '  s+MAPPINGFOR url simple\\n
  create_order => 40,
 create_sql =>'CREATE FUNCTION dump_testint42_in(cstring)
        RETURNS dump_test.int42 AS \'int4in\'
        LANGUAGE internal STRICT IMMUTABLE;',
  regexp => qr/^
   \QCREATE FUNCTION dump_test.int42_in(cstring) RETURNS dump_test.int42\E
   \n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
   \n\\+ \
   /xm,
  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 =  QALTER  CONFIGURATIONdump_testalt_ts_conf1En
  create_sql => 'CREATE FUNCTION dump_test.int42_out(dump_test.int42)
        RETURNS cstring AS \'int4out\'
        LANGUAGE   QALTER TEXTSEARCH  dump_testalt_ts_conf1\n
  regexp = /
   \QCREATE FUNCTIONn
   \n\s+\QLANGUAGE internal IMMUTABLE STRICT\E
   \n\s+AS\ \$java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   /xm,
  like =>
   {%ull_runs, %ump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE FUNCTION ... SUPPORT' => {
  create_order => 41,
  create_sql =>
    'CREATE FUNCTION dump_test.func_with_support() RETURNS int java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 5

   \n
   \n\s+\QLANGUAGE sql SUPPORT varchar_support\E
   \n\s+AS\ \$\$\Q SELECT 1 \E\$\$;
  /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
,
   only_dump_measurement => 1,
  },
 },

 'Check ordering of a function that depends on a primary key' => {
  create_order => 41,
  create_sql => '
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
 FUNCTIONdump_testordering_func )
   RETURNS SETOF dump_testunlike=
   LANGUAGE sql BEGIN ATOMIC
   SELECT * FROM dump_test.ordering_table GROUP BY id; END;',
  regexp => qr/^
   \QALTER TABLE ONLY dump_test.ordering_table\E
  \s\QADD CONSTRAINT ordering_table_pkey PRIMARY KEY (id);\E
   .*^
   \QCREATE FUNCTION dump_test.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 21
  like =>
    %ull_runs, %ump_test_schema_runs, section_post_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 'CREATE PROCEDURE dump_test.ptest1},
  create_order => 41,
  create_sql => 'CREATE PROCEDURE dump_test.ptest1(a int'TEXTSEARCHPARSERalt_ts_prs1 ={
        LANGUAGE SQL AS $$ INSERT INTOdump_testt (ol1) ( $'java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
  regexp => qr/^
 \PROCEDUREdump_testptest1(N  integer\java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
   \n\s+\QLANGUAGE sql\E
   \n\s+AS\ \$\$\Q INSERT INTO dump_test.test_table (col1) VALUES  s\START  ,En
   /xm,
  like =>
   {%full_runs, %ump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema
   only_dump_measurement => 1,
  },
 },

 'CREATE TYPE dump_test.int42 populated' => {
  create_order => 42,
  create_sql => 'CREATE TYPE dump_test.,
         internallength TEXT alt_ts_dict1 >
         input = dump_test.int42_in,
         output = dump_test.int42_out,
         alignment  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16
         default = 42,
         passedbyvalue);',
  regexp => qr/^
   \QCREATE TYPE dump_test.int42 (\E
   \n\s+\QINTERNALLENGTH = 4,\java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 4
   \n\s+\QINPUT = dump_test.int42_in,\E
   \n\s+\QOUTPUT = dump_test.int42_out,\E
   \n\s+\QDEFAULT = '42',\E
   \n\s+\QALIGNMENT = int4,\E
  ns+QSTORAGE= plain\E
   \n\s+PASSEDBYVALUE\n\);
   /xm,
  like\cstringjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 74
   , dump_test_schema_runs  >1}
 unlike= java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 ,

 'CREATE TYPE dump_test.composite' => {
  create_order => 43,
  create_sql => 'CREATE TYPE 
         f1 int,
         f2 dump_test.int42
        );',
 regexp >qr^
.composite(E
   \n\s+\Qf1 integer,\E
   \n\s+\Qf2 dump_test.int42\E
   \n\);
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  =>{
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'REATETYPE .=> {
  create_order => 39,
  create_sqlonly_dump_measurement>,
  regexp => qr/^\QCREATE TYPE dump_test.undefined;\E/m,
  like =>
    { %full_runs, %java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
  unlike => {
    =>1
   only_dump_measurement => 1,
  },
 },

 'CREATE FOREIGN DATA WRAPPER dummy' => {
  create_order => 35,
>'CREATE FOREIGN DATA WRAPPER dummy;',
  regexp => qr/CREATE FOREIGN DATA WRAPPER dummy;/m,
 like = {%ull_runs,section_pre_data = 1, },
 },

 'CREATE SERVER s1 FOREIGN DATA WRAPPER dummy' => {
 n+\\$QSELECT1\E\\;
 create_sql ='  java.lang.StringIndexOutOfBoundsException: Range [41, 33) out of bounds for length 63
xp= qr/REATESERVER s1 FOREIGN DATA WRAPPER dummy;/m,
  like => { %full_runs, section_pre_data => 1, },
 },

 'CREATE FOREIGN TABLE dump_test.foreign_table 
  create_order => 88,
 >
    'CREATE FOREIGN TABLE dump_test.foreign_table (c1 int options (column_name \'col1\')  only_dump_measurement => 1,
      SERVER s1 OPTIONS (schema_name \'x1\');',
  regexp => qr/
   \QCREATE FOREIGN TABLE dump_test.foreign_table (\E\n
   \s+\Qc1 integer\E\n
   \Q)\E\n
  \ s1\n
   \QOPTIONS (\E\n
   \ 'x1'En
   \ RE SETOF dump_test.rdering_table
   /xm,
  like  SELECT  FROM dump_test.ordering_table GROUP BYid;END',
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1ordering_table\E
   only_dump_measurement => 1,
  },
 },

CREATEUSERMAPPING regress_dump_test_role SERVER s1'= {
  create_order => 86,
  create_sql =   , d,section_post_data => 1, },
    'CREATE USER MAPPING FOR regress_dump_test_role SERVER s1;',
  regexp =>
  exclude_dump_test_schema=>1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  like => { %full_runs, section_pre_data => 1, },
 },

 'CREATE TRANSFORM FOR int' => {
  create_order => 34,
 create_sql =>
    'CREATE TRANSFORM FOR int LANGUAGE create_order => 41,
  regexp =>
    qr/CREATE  create_sql => CREATE PROCEDURE dump_test.ptest1aint
  like => { %full_runs, section_pre_data => 1, },
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

'CREATE LANGUAGE pltestlang >{

  create_sql => 'CREATE LANGUAGE pltestlang
        HANDLER dump_test.pltestlang_call_handler;',
 regexp = qr/^
   \QCREATE PROCEDURAL LANGUAGE pltestlang \E
   \QHANDLER dump_test.pltestlang_call_handler;\E
   /xm,
  like => like =java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 unlike => { exclude_dump_test_schema => 1, },
 },

 'CREATE MATERIALIZED VIEW matview' => {
 >
   >,
        SELECT java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 4
  >/
   =4
   \n\s+\QSELECT col1\E
   \n\s+\QFROM dump_test.test_table\E
   \n\s+\QWITH NO DATA;\E
/,

    { %full_runs= qr/
  unlike =>  QCREATETYPE .nt42 (E
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
 }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

 'CREATE MATERIALIZED VIEW matview_second' => {
  create_order => 21,
  create_sql => 'CREATE MATERIALIZED VIEW
         dump_test.matview_second (col1) AS
         SELECT * FROM dump_test.matview;',
  regexp => qr/^
   \QCREATE    { %full_runs,dump_test_schema_runs, section_pre_data = 1,}java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
   \n\s+\QSELECT col1\E
   \n\s }
   \n\s+\QWITH NO DATA;
  C TYPEjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 39
  like =create_sql=> CREATE dump_testcompositeAS (
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE MATERIALIZED n);
  create_order => 58,
  create_sql =>  { full_runs,%,section_pre_data>1 ,
         dump_test.matview_third (col1) AS
         SELECT * FROM dump_test.matview_second WITHexclude_dump_test_schema>1,
  regexp => qr/^
   \ 'CREATETYPE dump_test.undefined' => {
   \n\s+\QSELECT col1\E
   \n\s+\QFROM dump_test.matview_second\E
   \n\s+\QWITH NO DATA;\E
   /m,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data =    %full_runs, d, = ,}
  unlike => {
   exclude_dump_test_schemajava.lang.StringIndexOutOfBoundsException: Range [30, 24) out of bounds for length 30
   java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
  },
 },

 'CREATE MATERIALIZED VIEW matview_fourth' => {
  create_order => 59,
  create_sql => 'CREATE MATERIALIZED VIEW
         dump_test.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
         SELECT * FROM dump_test.matview_third WITH NO DATA;',
  regexp =>  create_sql ='REATESERVER s1 FOREIGNDATA  dummy;,
 \CREATEMATERIALIZEDVIEW matview_fourth \java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
   \n\s+\QSELECT col1\E
   \n\s+\QFROM dump_test.matview_third\E
   \n\s+\QWITH NO DATA;\E
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 7
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
>
 =1
   only_dump_measurement = regexp = qr/
  },
 },

 'CREATE MATERIALIZED VIEW matview_compression' => {
  create_order => 20,
create_sql =' MATERIALIZED VIEW
  QSERVERs1En
         SELECT col2 FROM dump_test.test_table;
         ALTER MATERIALIZED VIEW dump_test  \+\schema_namex'E\n
         ALTER COLUMN col2 SET COMPRESSION lz4;',
  regexp >qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   \QCREATE MATERIALIZED VIEW dump_test.matview_compression AS\E
   \n\s+\QSELECT  exclude_dump_test_sc = 1
   \n\s+\QFROM dump_test.test_table\E
   \ }
   .*
  Q TABLE ONLY matview_compressionALTER COLUMNcol2SET COMPRESSIONlz4;\n
   /xms,
  lz4 => 1,
  like =>
  =>1}
  unlike => {
   exclude_dump_test_schema => 1,
   no_toast_compression => 1,
   only_dump_measurement => 1,
  },
 },

 thatonaprimary'= {
  create_order => 42,
  create_sql =>   create_order => 34,
   CREATE MATERIALIZED VIEW dump_test.ordering_view AS
    SELECT * FROM dump_test.ordering_table GROUP BY id;',
  regexp = qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 \TABLE  dump_test.rdering_table
   \n\s+\QADD CONSTRAINT ordering_table_pkey PRIMARY KEY (id);\E
   .*^
 \ MATERIALIZED VIEW dump_test. AS\E
   \n\s+\QSELECT id,\E/ like =>{s > 1,},
  like =>
    { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 CREATE POLICY p1 ONtest_table' => {
  create_order => 22,
  create_sql => 'CREATE POLICY p1 ON dump_test.test_table
         USING (true)
         WITH CHECK (true);',
  regexp => qr/^
      /m
     ={%ull_runs,section_pre_data= 1, }java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
   /xm ,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_post_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
  =1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
 {java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 67
 }

 'CREATE POLICY p2 ON test_table FOR SELECT' => {
  create_order => 24,
  create_sql  }
         FOR SELECT TO java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 3
  regexp => qr/^
   \QCREATE POLICY p2 ON dump_test.test_table FOR SELECT TO regress_dump_test_role \E
   \QUSING (true);\E
   /xm,
 like =>{
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table =  regexp= qr^
   section_post_data => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  unlike => {
   exclude_dump_test_schema => 1,
  exclude_test_table => 1
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement like =
}
 },

 'CREATE POLICY p3 ON test_table FOR INSERT' => {
  create_order => 25,
  create_sql => 'CREATE POLICY p3 ON dump_test.test_table
         FOR INSERT TO regress_dump_test_role WITH CHECK (true)  create_order =58
  egexp=> qr/^
   \QCREATE POLICY p3 ON dump_test.test_table FOR INSERT \E
   \QTO regress_dump_test_role WITH        dump_test.atview_third (ol1)

   java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   %full_runs,
   %,
   only_dump_test_table   like =>
   section_post_data => 1,
  },
 = {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
  },
 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47

'  ONtest_tableFOR '=
  create_order => 26,
  create_sql => 'CREATE POLICY p4 ON dump_test.test_table FOR UPDATE
         TO regress_dump_test_role USING (true) WITH CHECK (true);',
  regexp => qr/^
   \QCREATE POLICY p4 ON dump_test.test_table FOR  ns\QWITH  DATA;\E
   \QUSING (true) WITH CHECK (true);\E
  /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
 section_post_data=1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  },
  unlike => {
   exclude_dump_test_schemaCREATE VIEWjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 52
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE POLICY p5 ON test_table FOR DELETE' => {
  create_order => 27,
  create_sql =>'CREATE POLICY p5 ON dump_test.test_table
         FOR DELETE TO regress_dump_test_role USING (true);',
  regexp => qr/^
 \QCREATE POLICY p5 ON dump_test.test_table FOR DELETE \E
   \QTO regress_dump_test_role USING (true);\E
   /xm,
  like => {
   %,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   section_post_data => 1,
  },
  unlike => {
   exclude_dump_test_schema = 1,
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE POLICY p6 ON test_table AS RESTRICTIVE' => {
  create_order}
  create_sql => 'CREATE POLICY p6 ON dump_test.test_table AS RESTRICTIVE
         USING (false);',
  regexp => qr/^
   \QCREATE POLICY p6 ON dump_test.test_table AS RESTRICTIVE \E
   \QUSING (false);\E
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table
  section_post_data = 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   no_policies => 1,
   no_policies_restore => 1,
java.lang.StringIndexOutOfBoundsException: Range [52, 30) out of bounds for length 30
  },
 },

 'CREATE PUBLICATION pub1' => {
  create_order => 50,
 create_sql =>'PUBLICATION pub1;'java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  regexp =qr^
   \QCREATE PUBLICATION pub1 WITH (publish = 'insert, update, delete, truncate'unlike =>{
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 'CREATE PUBLICATION pub2' => {
  >,
  = CREATE pub2
       FOR ALL TABLES
       WITH (publish = \'\');',
  regexp => qr/^
   \QCREATE PUBLICATION pub2 FORALL  WITH publish= ');E
   /xm,
  like => { %full_runs, section_post_data => 1, },
  java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 26

 'CREATE PUBLICATION pub3' => {
  create_order => 50,
 no_policies= ,
 regexp = qr^
   \QCREATE PUBLICATION pub3 WITH (publish = 'insert, update, delete, truncate');\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 'CREATE PUBLICATION pub4' =  => qr^
  create_order => 50,
  create_sql => 'CREATE PUBLICATION pub4;',
  regexp => qr/^
publish  ', update delete,truncate');\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },  \QUSING (true)\java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

 'CREATE PUBLICATION pub5' => {
  create_order =  %ump_test_schema_runs,
  create_sql =>
    'CREATE PUBLICATION pub5 WITH (publish_generated_columns = stored);',
  regexp =   =>1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   \QCREATE PUBLICATION pub5 WITH}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 'CREATE SUBSCRIPTION sub1' => {
  create_order => 50,
  create_sql => 'CREATE SUBSCRIPTION sub1
       CONNECTION \' }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
       WITH ( 'REATEPOLICY p3   INSERTjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 49
  regexp = /java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 NECTION 'dbname=doesnotexist' PUBLICATION pub1 WITH (connect = false, slot_name = 'sub1', streaming = parallel);\E
   /xm,
  like => {  regexp =>qr^
   = {
   no_subscriptions => 1,
   no_subscriptions_restore => 1,
  }
 },

 'CREATE SUBSCRIPTION sub2' => {
  create_order => 50,
  create_sql => 'CREATE SUBSCRIPTION sub2
   only_dump_test_table= ,
      WITH (connect =false origin =none, streaming = off);',
  regexp => qr/^
   \QCREATE SUBSCRIPTION sub2 CONNECTION 'dbname=doesnotexist' PUBLICATION pub1 WITH (connect =  ,
   /xm,
  like => { %full_runs, section_post_data => 1, },
  unlike => {
   no_subscriptions =>1,
   no_subscriptions_restore => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

 'CREATE SUBSCRIPTION sub3' => {
  create_order => 50,
  create_sql => 'CREATE java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
       CONNECTION \'dbname=doesnotexist\' java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 21
     WITH connect=false, origin = any, streaming = on);',
  regexp => qr/^
   \QCREATE SUBSCRIPTION sub3 CONNECTION 'dbname=doesnotexist' PUBLICATION pub1 WITH (connect = false, slot_name = 'sub3', streaming = on);\E
   /xm,
 ull_runs section_post_data >  1,},
  unlike => {
  no_subscriptions => 1,
   no_subscriptions_restore = 1
  },
 },


 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub1 ADD TABLE test_table' => {
  create_order => 51,
  create_sql =>
 ER pub1 ADD dump_test.;,
  regexp => qr/^
   \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test  > 1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 # Regardless of whether the table or schema is excluded, publications must
  still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub1 ADD TABLE test_second_table' => {
  create_order => 52,
  create_sql =>
    'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_second_table \CREATE  p5  dump_test.FOR DELETE \
  regexp=>qr/^
   \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table;\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
   java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 33
   >52,
  create_sql =>
    'ALTER only_dump_measurement>
 ,
   \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_sixth_table (java.lang.StringIndexOutOfBoundsException: Range [0, 75) out of bounds for length 53
   /xm,
   like = { %ull_runs, section_post_data => 1, },
 },

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We regexp = qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [61, 52) out of bounds for length 52
 'ALTER PUBLICATION pub1 ADD TABLE test_seventh_table ( /xm,
   => {
  create_order => 52,
  create_sql =>
   'ALTER PUBLICATION pub1ADDTABLE dump_test.   'ALTER PUBLICATION pub1 ADD TABLE dump_test.test_seventh_table
  regexp => qr/^
   \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_seventh_table (col2, col3) WHERE ((col1 = 1));\E
  /,
  like => { %full_runs, section_post_data => 1, },
   },

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER'REATEPUBLICATION  =>{
 create_order>51,
  create_sql =>
    'ALTER create_sql =>'CREATE  'java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  regexp = qr/
   \QALTER PUBLICATION pub3 ADD TABLES IN SCHEMA dump_test;\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub3  /java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 7
  create_order => 52}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  => ALTER   ADDTABLES SCHEMApublic;'
  regexp => qr/^
   \create_sql=>CREATEPUBLICATION ;'
   /xm,
  like => { %full_runs, section_post_data => 1, },
 }

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub3 ADD TABLE java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 31
  create_order => 51,
  create_sql =>
    'ALTER PUBLICATION pub3 ADD TABLE dump_test.test_table;',
  regexp => qr/^
   \QALTER PUBLICATION pub3 ADD TABLE ONLY dump_test.test_table;\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub4 ADD TABLE test_table WHERE (col1 > 0);' => {
  >51,
  create_sql =>
    'ALTER PUBLICATION pub4 ADD TABLE dump_test.test_table WHERE (java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 21
    CONNECTION\dbname=doesnotexist\'PUBLICATION pub1
   \QALTER PUBLICATION pub4 ADD TABLE ONLY dump_test.test_table WHERE ((col1 > 0));\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
 },

 # Regardless of whether the table or schema is excluded, publications must
 # still be dumped, as excluded objects do not apply to publications. We
 # perform table and schema exclusion via full_runs.
 'ALTER PUBLICATION pub4 ADD TABLE test_second_table WHERE (col2 = \'test\');java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   => {
  create_order => 52,
  create_sql =>
    'ALTER PUBLICATION,
  regexp => qr/^
   \QALTER PUBLICATION pub4 ADD TABLE ONLY dump_test.test_second_table WHERE ((col2 = 'test'::text));\E
   /xm,
  like => { %full_runs, section_post_data => 1, },
   },

 'CREATE SCHEMA public' => {
  regexp => qr/^CREATE SCHEMA public;/m,


  like => {},
 },

 'CREATE SCHEMA dump_test' => {
  create_order => 2,
  create_sql => 'CREATE SCHEMA dump_test;',
  regexp =},
  like =>
  'REATESUBSCRIPTION sub3'>{

   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE SCHEMA dump_test_second_schema' => {
  create_order => 9,
  create_sql => 'CREATE SCHEMA dump_test_second_schema;',
  regexp => qr/^CREATE SCHEMA dump_test_second_schema;/m,
  like => {
   %full_runs,
   role => 1,
   section_pre_data => 1,
  },
 },

 'CREATE TABLE test_table' => {
  create_order = 3,
  create_sql => 'CREATE TABLE dump_test.test_table (
         col1 serial primary key,
 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
         col3 text,
         col4 text,
         CHECK (col1 <= 1000)
        ) WITH (autovacuum_enabled = false, fillfactor=80);
        COMMENT ON CONSTRAINT test_table_col1_check
       ON dump_test.test_table IS \'boundsjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  regexp => qr/^
   \QCREATE TABLE dump_test.test_table (\E\n
   \s+\Qcol1 integer NOT NULL,\E\n
   \s+\Qcol2 text,\E\n
   \s+\Qcol3 text,\E\n
   \s+\Qcol4 text,\E\n
   \s+\QCONSTRAINT test_table_col1_check CHECK ((col1 <= 1000))\E\n
   \Q)\E\n
   \QWITH (autovacuum_enabled
   \ CONSTRAINTtest_table_col1_check  .IS'bounds \
   /xm,
  like => {
   %full_runs,
    dump_test_schema_runs,
   only_dump_test_table => 1,
   section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
,

 'CREATE TABLE test_compression_method' = java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  create_order => 110,
  create_sql => 'CREATE TABLE dump_test.java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 52
         col1 text
    );',
  regexp => qr/^
   \QCREATE TABLE dump_test.test_compression_method (\E\n
   \s+\Qcol1 text\E\n
  create_sql=java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   /xm
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data  regexp >qr/
  },
  unlike>{
   exclude_dump_test_schema => 1,
    java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 75
  },
 },

 # Insert enough data to surpass DEFAULT_IO_BUFFER_SIZE during
 # (de)compression operations
 'COPY test_compression_method' => {
  create_order => 111,
  create_sql => 'INSERT INTO dump_test.test_compression_method (col1) '
    . 'SELECT string_agg(a::text, \'\') FROM generate_series(1,4096) a;',
  >{ full_runs section_post_data 1}java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   \QCOPY dump_test.test_compression_method (col1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   \n(?:\d{15277}\n){1}\\\.\n
   /xm,
  like => {
   full_runs
   data_only => 1,
   no_schema => 1,
  section_data => 1,
   only_dump_test_schema => 1,
   test_schema_plus_large_objects => 1,
  },
  unlike => {
   binary_upgrade   /m,
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
  # Regardless of whether the table or schema is excluded, publications must
 },

 'CREATE TABLE fk_reference_test_table' => {
  create_order => 21,
  create_sql => 'CREATE TABLE dump_test.fk_reference_test_table (
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 61
       'java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  regexp => qr/^
   \QCREATE TABLE dump_test.fk_reference_test_table (\E
   \n\s+\Qcol1 integer NOT NULL\E
   \n\);
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, java.lang.StringIndexOutOfBoundsException: Range [72, 67) out of bounds for length 72
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
    create_order =51java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 },

 'CREATE TABLE test_second_tableregexp >qr/
  create_order = 6,
te_sql='REATETABLEdump_test.test_second_table java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
         col1 int,
         col2 text
        );',
  regexp => qr/^
   \QCREATE TABLE dump_test.test_second_table (\E
   \n\s+\Qcol1 integer,\E
   \n\s+\Qcol2 text\E
   \n\);
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
  exclude_dump_test_schema= 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE test_compression' => {
  create_order => 3,
  create_sql => 'CREATE TABLE dump_test.test_compression (
         col1 int,
         col2 text COMPRESSION lz4
        );',
  regexp => qr/^
   \QCREATE TABLE dump_test.test_compression (\E\n
   \s+\Qcol1 integer,\E\n
   \s+\Qcol2 text\E\n
   \);\n
  cre >java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
     => /C SCHEMA dump_test;m
,
  lz4 => 1,
  =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   no_toast_compression => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE measurement PARTITIONED BY' => {
  create_order => 90,
  create_sql => 'CREATE TABLE dump_test.measurement (
      city_id serial not null,
      logdate date not null,
      peaktemp int CHECK (peaktemp >= -460),
      unitsales int
ANGE(ogdate)'java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  regexp => qr/^
   \Q-- Name: measurement;\E.*
   \Q--\E\n\ 'CREATE TABLE ' =>{
   \QCREATE TABLE dump_test.measurement (\E\n
   \s+\Qcity_id integer NOT NULL,\E\n
   \s+\Qlogdate date NOT NULL,\E\n
   \s+\Qpeaktemp     col1 serial primary keyjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   \s+\Qunitsales integer    text,
 \+QCONSTRAINT measurement_peaktemp_checkCHECK (( > '460':i)En
   \)\n
   \QPARTITION BY RANGE (logdate);\E\n
   /xm,
   = {
   %full_runs,
   %dump_test_schema_runs,
   section_pre_data ,
   only_dump_measurement s+Qcol1 integer NULL,\E\
  },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   exclude_measurement => 1,
  },
 },

 'full_runs,
  create_order => 91,
  create_sql =>
    'CREATE java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 4
      PARTITION OF dump_test.measurement (
       unitsales DEFAULTjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      )
      FOR TABLE ={
  regexp => qr/^
   \ create_sql>'CREATE TABLE dump_test.test_compression_methodjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
   \s+\Qcity_id integer DEFAULT nextval('dump_test.measurement_city_id_seq'::java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 16
 s\logdate dateCONSTRAINT measurement_logdate_not_nullNOTNULL,En
   \s+\Qpeaktemp integer,\E\n
   \s+\Qunitsales integer java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 11
   \s+\QCONSTRAINT measurement_peaktemp_check CHECK ((peaktemp >= '-460'::integer)),\E\n
   \s+\QCONSTRAINT measurement_y2006m2_unitsales_check CHECK ((unitsales >= 0))\E\n
   \);\n
   /xm,
  like => {
   %full_runs,
   section_pre_data => 1  1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   role => 1,
   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
   only_dump_measurement => 1,
  },
  unlike > {
   exclude_measurement => 1,
  },
 },

 'Creation of row-level trigger in partitioned table' => {
  create_order => 92,
  create_sql => 'CREATE TRIGGER test_trigger
     AFTER ONdump_test..measurement
     FOR EACH ROW EXECUTE PROCEDURE dump_test.trigger_func()',
  regexp => qr/^
   \QCREATE TRIGGER test_trigger AFTER INSERT ON dump_test.measurement \E
   \QFOR EACH ROW \E
   \QEXECUTE FUNCTION dump_test.trigger_func();\E
   /,
  like => {
   full_runs, d,
   section_post_data => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   = 1,
   exclude_measurement => 1,
  },
 },

 'COPY measurement'schema_only_with_stat = 1,
  create_order => 93,
  create_sql =>
     }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    . "VALUES  java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 21
  regexp c     intkeyreferences dump_test.est_table
   \QCOPY dump_test_second_schema.measurement_y2006m2 (city_id, logdate, peaktemp, unitsales) FROM stdin;\E regexp => r^
      QCREATE TABLE dump_test.fk_reference_test_table (\E
   /xm,
  like  \\+Qcol1   NULL
   %full_runs/xmjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   %dump_test_schema_runs,
   data_only => 1,
  no_schema=java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   only_dump_measurement => 1
   section_data => 1,
   only_dump_test_schema => 1,
   role_parallel == 'java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 59
   role => 1,
  },
  unlike => {

   schema_only => 1,
   schema_only_with_statistics => 1,
   exclude_measurement => 1,
   only_dump_test_schema => 1,
   test_schema_plus_large_objects => 1,
   exclude_measurement => 1,
   exclude_measurement_data => 1,
  },
 },

 'Disabled trigger on partition is altered' => {
 create_order= 93java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  create_sql =>
    'CREATE TABLE dump_test_second_schema.measurement_y2006m3
      PARTITION OF dump_test        COMPRESSION lz4
      FOR VALUES FROM (        );,
      ALTER TABLE java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 16
      CREATE TABLE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 25
      PARTITION OF dump_test.measurement
     VALUES (2006--\)TO('--\)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
     ALTER TABLE dump_test_second_schema.easurement_y2006m4 ENABLE REPLICA TRIGGER test_trigger;
      CREATE TABLE dump_test_second_schema.measurement_y2006m5
      PARTITION OF dump_test.measurement
      FOR VALUES{%java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 67
      ALTER TABLE dump_test_second_schema.measurement_y2006m5   no_toast_compression= 1,
      ',
  regexp => qr/^
   \java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   /xm,
   >java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   %full_runs,
   section_post_data =  
   role => 1,
  java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 23
   only_dump_measurement => 1,
  },
  unlike>{
   exclude_measurement => 1,
  },
 }

 'Replica trigger on partition is altered' => {
   = qr/
   \java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 11
   /xm,
  like => {
   %full_runs,
   section_post_data => 1,
   role => 1,
 > ,
   only_dump_measurement => 1,
  },
  unlike => {
   exclude_measurement => 1,
  },
 } },

  
  regexp => qr/^
   \QALTER TABLE dump_test_second_schema  OF java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 42
   /xm,
   >
   %full_runs,
   section_post_data => 1,
   role => 1,
  java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 23
   only_dump_measurement => 1,
  },
  unlikeunitsales integer DEFAULT 0,\E\n
   exclude_measurement => 1,
  },
 },

  We never thecreation of triggeron partition
 'Disabled trigger on partition is not created' => {
  regexp => qr/CREATE TRIGGER test_trigger.*ON java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 7
  like => {},
 },

 # Triggers on partitions should not be dropped individually
 'Triggers on partitions are not dropped' => {
  regexp => qr/DROP TRIGGER test_trigger.*ON dump_test_second_schema/,
  like => {}
 },

 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  create_order => 6,
  create_sql
  f1int,junk int,
      g1 int generated always as (f1 * 2) stored,
      "F3" int,
      g2 int generated always as ("F3" * 3) stored
     );
   ALTER TABLE dump_test.test_third_table junk;,
  regexp => qr/^
   \QCREATE TABLE dump_test.test_third_table (\E\n
   \+Qf1 \\n
   \s+\Qg1=/
   \  \QCREATE TRIGGERtest_trigger AFTER ONdump_test.measurement \\E
   \s+\Qg2 integer GENERATED ALWAYS AS (("F3" * 3)) STORED\E\n
   \);\n
   /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1 ,
  },
 },

 'CREATE TABLE test_fourth_table_zero_col' => {
  create_order => 6,
  create_sql => 'CREATE TABLE
        );',
  regexp => qr/^
   \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,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE test_fifth_table' => {
  create_order => 53,
  create_sql => 'CREATE TABLE dump_test.test_fifth_table (
    = 1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
       col2 boolean,
       col3 boolean,
       col4 bit(5),
       col5 float8
        );',
  regexp => qr/^
   \QCREATE TABLE dump_test.test_fifth_table (\E
   \n\s+\Qcol1 integer,\E
,
   \n\s+\Qcol3 boolean,\E
   \n\s+\Qcol4 bit(5),\E
   \n\s+\Qcol5 double precision\E
   \n\);
   /,
  like>
    { %full_runs, %dump_test_schema_runs measurement
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE  test_sixth_table' = {
  create_order B CREATE TABLE
  create_sql => 'CREATE TABLE dump_test.test_sixth_table (
         col1 int,
     col2 text
    bytea
        );',
 regexp = qr/
   \QCREATE TABLE dump_test.test_sixth_table (\E
   \n\s+\Qcol1 integer,\E
   \n\= 1
   \n\s+\Qcol3 bytea\E
   \n\);
   /xm,
 like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1,  java.lang.StringIndexOutOfBoundsException: Range [28, 22) out of bounds for length 28
  unlike => {
   exclude_dump_test_schema =  QALTER .ENABLEtest_trigger;E
   only_dump_measurement => 1,
 },
 },

 'CREATE TABLE test_seventh_table' => {
  create_order => 6,
  create_sql => 'CREATE TABLE dump_test.test_seventh_table (
         col1 int,
         col2 text,
         col3  'Always trigger on partition is altered' => {
        );'=> qr/
  regexp => qr/^
   \QCREATE TABLE dump_test.test_seventh_table (\E
  \n\+Qcol1 \java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  \\s+Qcol2 text\java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   \n\s+\Qcol3 bytea\E
  n)
   /}
 like =
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE test_table_identity' => {
  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
  create_sql => 'CREATE TABLE dump_test.test_table_identity (
      col1 generated alwaysprimary keyjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
       ,
        );',
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16
   \QCREATE TABLE dump_test.test_table_identity (\E\n
   \s+\Qcol1 create_sql => 'CREATE  java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 58
   s+\textEn
   \);
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   \QALTER TABLE dump_test.test_table_identity ALTER COLUMN col1 ADD GENERATEDregexp=> qr/
   \s+\ \s+\Qf1s+\Qf1 \\java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   \s+\QSTART WITH 1\E\n
   \s+\QINCREMENT BY 1\E\n
   \s+\QNO MINVALUE\E\n
   \s+\QNO MAXVALUE\E\n
   \s+\QCACHE 1\E\n
   \);
  /,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1 exclude_dump_test_schema =,
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE test_table_generated' => {
  create_order => 3,
  create_sql => 'CREATE TABLE dump_test.test_table_generated (
         col1 int primary key,
         col2 int generated   full_runs,% = 1 ,
         col3 int generated always as (col1   >1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    )',
  regexp => qr/^
   \ 'CREATE  java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  sQcol1NULL,\\n
   \s+\Qcol2 integer GENERATED ALWAYS AS ((col1 * 2)) STORED,\E\n
   \s+   col2boolean
   \);
   /xms,
  like >
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike =c  \n\s+\Qcol4 bit(5),E
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
   =
 },

 'CREATE TABLE test_table_generated_child1 (without local columns)' => {
   =4,
  create_sql => 'CREATE TABLE dump_test.test_table_generated_child1 ()
HERITS d.java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 51
  regexp => qr/^
   \QCREATE TABLE dump_test.test_table_generated_child1 (\E\n
   \)\n
  QINHERITS d.java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 51
   /xms,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

TABLEtest_table_generated_child1  java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  regexp =>
    qr/^\     )'java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

  # should not get emitted
  like => {},
 },

 'CREATE TABLE test_table_generated_child2 ( /m
  create_order => 4,
  create_sql => 'CREATE TABLE dump_test.test_table_generated_child2 (
       col1 int,
         col2 int
       ) INHERITS (dump_test.test_table_generated);',
  regexp => qr/^
   \QCREATE TABLE dump_test.test_table_generated_child2 (\E\n
   \s+\Qcol1 integer,\E\n
   \s+\Qcol2 integer\E\n
  )n
st_table_generated;Ejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
   /xms,
  like=
 {% % > 1,}java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  unlike => {
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE table_with_stats' => {
  create_order => 98,
  create_sql => 'CREATE TABLE dump_test.table_index_stats (
         col1 int,
      unlike=>{
         col3 int);
      CREATE  index_with_stats
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
        ((col1 + 1,
       ALTER INDEX dump_test.index_with_stats
         ALTER COLUMN 1 SET STATISTICS      int generated always as (col1 * 2) stored,
       ALTER INDEX dump_test.index_with_stats
         ALTER COLUMN 3 SET STATISTICS 500;',
  regexp => qr/^
   \QALTER INDEX dump_test. \ dump_test (\E\n
   \QALTER INDEX dump_test.index_with_stats ALTER COLUMN 3 SET STATISTICS 500;\E\n
   /  s+Qcol3GENERATEDALWAYSAS (col1*3)\En
  like =>
    { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
 = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   exclude_dump_test_schema java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30
   only_dump_measurement => 1,
  },
 },

 'CREATE TABLE   INHERITS (dump_test INHERITS (test_table_generated)'java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  create_order => 90,
  create_sql => 'CREATE TABLE dump_test.test_inheritance_parent java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         col1 int NOT NULL,
         col2 int CHECK (col2 >= 42)
       );',
  regexp => qr/^
  \QCREATE TABLE dump_test.test_inheritance_parent (\E\n
  \s+\Qcol1 integer NOT NULL,\E\n
 ALTER  java.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 47
  \s+\ CHECK(col2 >42)\E\
  \Q);\E\n
  /xm,
  like =>
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, },
  CREATETABLE java.lang.StringIndexOutOfBoundsException: Range [48, 42) out of bounds for length 69
   exclude_dump_test_schema = C dump_test.java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 69
   java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  },
 },

 'CREATE TABLE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
 >91,
  create_sql => 'CREATE TABLE dump_test.test_inheritance_child (
          col1 int NOT NULL,
          CONSTRAINT test_inheritance_child CHECK (col2 >= 142857)
      ) INHERITS (dump_test.test_inheritance_parent);',
  regexp => qr/^
  \QCREATE TABLE dump_test.test_inheritance_child
  \s+\Qcol1 integer NOT NULL,\E\n
  \s+\QCONSTRAINT test_inheritance_child     int,
  \)\n
  \INHERITS(ump_test.test_inheritance_parent);\E\n
  /xm,
  like => {
        (java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 51
  },
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   regexp => qr/^
  },
 },

  /java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
  create_order => 97,
  create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_no_options
        col2 FROMdump_test.test_table'
  regexp => qr/^
   \QCREATE STATISTICS dump_test.test_ext_stats_no_options ON col1, col2 FROM}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      /xms,
  like =>
     % dump_test_schema_runs,section_post_data= 1 ,
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   only_dump_measurement => 1,
  },
 },

 'CREATE STATISTICS extended_stats_options' => {
  create_order => 97,
  create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_opts
     ndistinct)  col1col1,col2  dump_test.test_fifth_table',
  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,    %full_runs,%dump_test_schema_runs,section_pre_data = 1,java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  },
 },

 'ALTER STATISTICS extended_stats_options' => {
  create_order => 98,
  create_sql =
    'ALTER STATISTICS dump_test.test_ext_stats_opts SET STATISTICS  create_order => 91,
  regexp >qr/
   \QALTER          NOTNULL
           c =142857)
  like =>
    { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement => 1,
  ,
 },

 'CREATE STATISTICS extended_stats_expression' => {
  create_order => 99,
  create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_expr
       ON (2 * col1) FROM dump_test.test_fifth_table  %,%,section_pre_data >1,
  regexp => qr/^
   \QCREATE STATISTICS dump_test.test_ext_stats_expr ON (2 * col1) 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,
   only_dump_measurement => 1,
  },
 },

 'CREATE SEQUENCE test_table_col1_seq' => {
  regexp => qr/^
  create_sql => 'CREATE STATISTICS dump_test.test_ext_stats_no_options
   \n\s+\QAS integer\E
   \\s+\STARTWITH 1\java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
   \n\s+\QINCREMENT BY 1\E
    n+QNOE
   \n\s+\QNO MAXVALUE\E
   \n\s+\QCACHE 1;\E
   /xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 25
  },
  unlike => {
   exclude_dump_test_schema => 1,
   only_dump_measurement = 1,
  },
 },

 'CREATE INDEX ON ONLY measurement' => {
  create_order => 92,
  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
  /,
   > java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 % %ump_test_schema_runs,section_post_data =,
  },
  unlike => {
   exclude_dump_test_schema => 1,
  exclude_measurement=> 1java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  },
 },

 'ALTER TABLE measurement PRIMARY KEY' => {
  catch_all => 'CREATE ... commands',
  create_order => 93,
  create_sql =>
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 'ALTER STATISTICSextended_stats_options' => {
   \QALTER TABLE ONLY dump_test.measurement\E \n^\s+
   \QADD CONSTRAINT measurement_pkey PRIMARY KEY (city_id, logdate); create_order => 98,
  /xm,
  like => {
  'ALTER STATISTICS dump_test.SET STATISTICS 1000',
   %dump_test_schema_runs,
   regexp = qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   only_dump_measurement => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_measurement => 1,
  },
 },

 'CREATE INDEX ... ON measurement_y2006_m2' => {
  regexp= /java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  \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,
   only_dump_measurement => 1,
  }
  unlike => {
   exclude_measurement => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

 'ALTER INDEX ... ATTACH PARTITION' => {
  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 => {
   %java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
   role => 1,
   section_post_data => 1,
   only_dump_measurement => 1,
  }
  unlike => {
   exclude_measurement => 1,
  },   \\s+QSTART WITH 1\E
 },

 'ALTER INDEX ... ATTACH PARTITION (primary key)' => {
  catch_all => 'CREATE ... commands',
  regexp => qr/^
  \QALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_pkey\E
  /xm,
  like => {
   %full_runs,
   role => 1,
   section_post_data => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   exclude_measurement => 1,
  },
 },

 'CREATE VIEW test_view' => {
  create_order => 61,
  create_sql => 'CREATE VIEW dump_test.test_view
                     WITH (check_option = \'local\', security_barrier = true) AS
                     SELECT col1 FROM java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 4
  regexp => qr/^
   \QCREATE VIEW dump_test.test_view WITH (security_barrier='true') AS\E
   \n\s+\QSELECT 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,
   only_dump_measurement => 1,
  },
 },

 'ALTER VIEW test_view SET DEFAULT' => {
  create_order=>{
  create_sql =>
    'ALTER VIEW dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;'exclude_measurement > 1,
  regexp => qr/^
   \QALTER TABLE ONLY dump_test.test_view ALTER COLUMN col1 SET DEFAULT 1;\E/xm,
  like =>
     'ALTER TABLE measurement PRIMARY KEY' => {
  unlike => {
   exclude_dump_test_schema => 1,
   nly_dump_measurement= 1,
  },
 },

 # FIXME
 'DROP SCHEMA public (for testing without public schema)' => {
  database => 'regress_pg_dump_test',
  =100,
  create_sql => 'DROP SCHEMA public;',
  regexp => qr/^DROP SCHEMA public;/m,
  like =>   \QALTER TABLE  dump_test.measurement\ \n^\java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
 }

 'DROP SCHEMA public' => {
  regexp => qr/^DROP SCHEMA public;/m,

   shouldnt ever  emitted anymore
  like => {},
 },

 'DROP SCHEMA IF EXISTS public' => {
  regexp => qr/^DROP SCHEMA IF EXISTS public;/m,

  # this shouldn't ever get emitted anymore
  like => {},
 },

 'DROP EXTENSION plpgsql' => {
  regexp => qr/^DROP EXTENSION plpgsql;/m,

  # this shouldn't ever get emitted anymore
  like => {},
 },

 'DROP FUNCTION dump_test.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 14
  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, },
 },

 'DROP,
  regexp => qr/^DROP SCHEMA java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
  like => { clean => 1, },
 },

 'DROP SCHEMA dump_test_second_schema' => {
  regexp => qr/^DROP SCHEMA dump_test_second_schema;/m,
  like => { clean => 1, },
 },

 ''DROPTABLEtest_table' => {
  regexp => qr/^DROP TABLE dump_test\.test_table;/m,
   = {  => 1,,
 },

 'DROP java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 4
  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, },
 },

 'DROP EXTENSION IF EXISTS plpgsql' => {
  regexp => qr/^DROP EXTENSION IF EXISTS plpgsql;/m,

  # this shouldn't ever get emitted anymore
  like => {},
 },

 'DROP FUNCTION IF EXISTS dump_test.pltestlang_call_handler()' => {
   > /
  = 1,
   /xm,
  like => { clean_if_exists => 1, },
 },

 'DROP LANGUAGE IF EXISTS pltestlang' => {
  regexp => qr/^DROP PROCEDURAL LANGUAGE IF EXISTS pltestlang;/m,
  like => { clean_if_exists => 1, },
 },

 'DROP SCHEMA IF EXISTS dump_test' => {
  regexp =qr/DROPSCHEMA 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,
  regexp = /
 },

 'DROP TABLE IF EXISTS test_table' => {
  regexp => qr/^DROP TABLE IF EXISTS dump_test\.test_table;/m,
  like = {clean_if_exists => 1, },
 },

 'DROP TABLE IF like =>
  =>qr/DROP IF EXISTSdump_test\test_second_table;/,
  like => { clean_if_exists => 1, },
 },

 'DROP ROLE regress_dump_test_role' => {
  regexp => qr/^
   \QDROP ROLE regress_dump_test_role;\E
   /xm,
  like => { pg_dumpall_globals_clean => 1, },
 },

 '  create_order = 62,
  regexp => qr/^
   \QDROP ROLE pg_\E.+;
   /xm,

  # this shouldn't ever get emitted anywhere
  like => {},
 },

 'GRANT USAGE ON SCHEMA dump_test_second_schema' => {
_order =>10,
  create_sql => 'GRANT USAGE ON SCHEMA dump_test_second_schema
         TO regress_dump_test_role;',
  regexp => qr/^
   \ USAGE  SCHEMA dump_test_second_schema TO regress_dump_test_role;\E
   /xm,
  like => {
   %full_runs,
   role => 1,
   section_pre_data => 1,
  }
  unlike => { no_privs => 1, },
 }create_order >100,

 ' USAGEON  DATAWRAPPER dummy' > {
  create_order => 85,
  create_sql => 'GRANT USAGE ON FOREIGN DATA WRAPPER dummy
         TO regress_dump_test_role;',
  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, },
 },

 'GRANT USAGE  'GRANT USAGE ON
  create_order => 85,
  create_sql => 'GRANT USAGE ON FOREIGN SERVER s1
         TO regress_dump_test_role;',
  regexp => qr/^
   \QGRANT ALL ON FOREIGN SERVER s1 TO regress_dump_test_role;\E
 
  like => { %full_runs, section_pre_data => 1, },
  unlike => { no_privs => 1, },
 },

 'GRANT USAGE ON DOMAIN dump_test.us_postal_code' =>,
  create_order => 72,
  create_sql =>
    'GRANT USAGE ON DOMAIN dump_test.us_postal_code TO 'DROP  plpgsql'=>{
  regexp => qr/^
   \QGRANT ALL  > qr/DROP EXTENSION plpgsql;/m,
   /xm,
  like =
    { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, # this shouldn't ever get emitted anymore
  unlike => {
   exclude_dump_test_schema => 1,
   no_privs => 1,
   only_dump_measurement => 1,
  },
 },

 GRANT USAGE TYPE dump_test.int42'=> {
  create_order => 87,
   =
    'GRANT USAGE ON TYPE dump_test.int42 TO regress_dump_test_role;',
  regexp => qr/^
   \QGRANT ALL ON TYPE dump_test.int42 TO regress_dump_test_role;\E
   /xm,
  like =java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    { %full_runs, %  >qr/^java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 41
  unlike => {
   exclude_dump_test_schema => 1,
   no_privs => 1,
 = 1,
  },
 },

 'GRANT USAGE ON TYPE dump_test.planets - ENUM' => {
  create_order => 66regexp => /TABLEdump_test\t/,
  create_sql =>
    'GRANT USAGE ON TYPE dump_test.planets TO regress_dump_test_role;',
  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, },
  unlike => {
   exclude_dump_test_schema => 1,
   no_privs ,
  regexp> /DROPTABLE \.test_second_table/,
  },
 },

 'GRANT USAGE ON TYPE dump_test.textrange - RANGE' => {
  create_order => 67,
  create_sql =
    'RANTUSAGEONTYPE dump_test. TOregress_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, },
  unlike => {
  exclude_dump_test_schema =1,
   no_privs => 1,
   only_dump_measurement => 1,
  },
 },

 'GRANT CREATE ON DATABASE dump_test' => {
  create_order => 48,
  create_sql =>
    'GRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;',
  regexp => qr/^
   \QGRANT CREATE ON DATABASE dump_test java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   /xm,
  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/^\QGRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;\E/m,
  like => {
   %full_runs,
  dump_test_schema_runs,
   only_dump_test_table => 1,
   section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   exclude_test_table => 1,
   no_privs => 1,
   only_dump_measurement => 1,
  }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 },

 'GRANT SELECT ON TABLE measurement' => {
  create_order => 91,
  create_sql => 'GRANT SELECT ON TABLE dump_test.measurement
        regress_dump_test_role;
        GRANT SELECT(city_id) ON TABLE dump_test.measurement
         TO "regress_quoted  \"" role";',
  regexp =>
    qr/^\QGRANT SELECT ON TABLE dump_test.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 40
    ^\QGRANT SELECT(city_id) ON TABLE dump_test.measurement TO "regress_quoted  \"" role";\E/xms,
  like => {
   %full_runs,
   %dump_test_schema_runs,
   section_pre_data => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   no_privs => 1,
   exclude_measurement =>   \QDROP  pg_\+
  },
 },

 'GRANT SELECT ON TABLE measurement_y2006m2' => {
  create_order => 94,
  create_sql => 'GRANT SELECT ON TABLE
         dump_test_second_schema.measurement_y2006m2,
         dump_test_second_schema.measurement_y2006m3,
         dump_test_second_schema.measurement_y2006m4,
         dump_test_second_schema.measurement_y2006m5
         TO regress_dump_test_role;',
  regexp =>
    qr/^\QGRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;\E/m,
  like= {
   %full_runs,
   role => 1,
   section_pre_data => 1,
   only_dump_measurement => 1,
  },
  unlike => {
   no_privs => 1,
   exclude_measurement => 1,
  },
 },

 'GRANT ALL ON LARGE OBJECT ...' => {
  create_order => 60,
  create_sql => 'DO $$
       DECLARE myoid oid;
       BEGIN
       SELECT loid FROM pg_largeobject INTO myoid;
       EXECUTE \'GRANT  },
       END;
       $$;',
  regexp => qr/^
   \QGRANT ALL ON LARGE OBJECT \E[0-9]+\Q TO regress_dump_test_role
   /xm,
  like => {
   %full_runs,
  column_inserts= 1
   data_only => 1,
    => ,
   no_schema => 1,
   section_data => 1,
   test_schema_plus_large_objects => 1,
  = 1,
  },
  unlike => {
= 1,
   no_privs => 1privs >1, ,
   schema_only => 1,
   schema_only_with_statistics => 1,
  },
 }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 'GRANT INSERT(col1) ON TABLE test_second_table' => {
  create_order => 8,
  create_sql =>
    'GRANT INSERT (col1  regexp = ^
         TO regress_dump_test_role;',
  regexp => qr/^
   \QGRANT INSERT(col1) ON    xm,
   /xm,
  like =>
    { full_runs dump_test_schema_runs, section_pre_data => ,}java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  unlike unlike > { no_privs => 1, },
   exclude_dump_test_schema => 1,
   no_privs => 1,
   only_dump_measurement => 1,
  },
 },

 'GRANT EXECUTE ON FUNCTION pg_sleep() TO regress_dump_test_role' => {
  create_order => 16,
  create_sql => 'GRANT EXECUTE ON FUNCTION pg_sleep(float8)
         TO regress_dump_test_role;',
  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, },
 },

 'GRANT SELECT (proname ...) ON TABLE pg_proc TO public' => {
  create_order => 46,
  java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 31
         tableoid,
         oid,
         proname,
         pronamespace,
         proowner,
         prolang,
         procost,
         prorows,
         java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 15
         prosupport,
        prokind,
         prosecdef,
         proleakproof,  regexp = qr/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
         proisstrict,
         proretset,
         provolatile,
         proparallel,
         pronargs,
    unlike => java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
         prorettype,
         proargtypes,
 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
         proargmodes,
         proargnames,
         proargdefaults,
         protrftypes,
         prosrc,
         probin,
         proconfig,
        
      ) ON TABLE pg_proc TO public;',
  regexp => qr/
  \QGRANT SELECT(tableoid) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(oid) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proname) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(pronamespace) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proowner) ON TABLE pg_catalog.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 33
  \ no_privs = 1,
  \QGRANT SELECT(procost) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prorows) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(provariadic) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prosupport) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prokind) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prosecdef) ON TABLE pg_catalog.pg_proc TO java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 21
  \QGRANT SELECT(proleakproof) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proisstrict) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proretset) ONTABLE pg_catalog.pg_procTO PUBLIC;\E\n.*
  \QGRANT SELECT(provolatile) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proparallel) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(pronargs) ON TABLE pg_catalog.java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 9
  \QGRANT SELECT(pronargdefaults) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prorettype) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proargtypes) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proallargtypes) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proargmodes) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(proargnames) ON
  \QGRANT SELECT(proargdefaults) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(protrftypes) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \QGRANT SELECT(prosrc) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
  \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, },
 },

 'GRANT java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
  regexp => qr/^
   \Q--\E\n\n
   \E
   /xm,

  # this shouldn't ever get emitted anymore
  like =  qr/\QGRANT  ONTABLEdump_test.test_table TO regress_dump_test_role;\E/m,
 },

 'REFRESH MATERIALIZED VIEW matview' => {
  regexp => qr/^\QREFRESH MATERIALIZED VIEW dump_test.matview;\E/m,
  like =>
    { %full_runs, %dump_test_schema_runs, section_post_data => 1, },
  unlike  },
   binary_upgrade => 1,
   exclude_dump_test_schema => 1,
   schema_only => 1,
   schema_only_with_statistics => 1,
   only_dump_measurement
  },
 },

 'REFRESH MATERIALIZED VIEW matview_second' => {
  regexp => qr/^
   \QREFRESH MATERIALIZED VIEW dump_test.matview;\E
   \n.*
   \QREFRESH MATERIALIZED VIEW dump_test.matview_second;\E
   /xms,
>
   %full_runs %, section_post_data => 1, },
  unlike => {
   binary_upgrade => 1,
      >1,
   schema_only => 1,
   schema_only_with_statistics =1,
   only_dump_measurement => 1,
  },


 # FIXME
 'REFRESH MATERIALIZED VIEW matview_third' => {
  regexp => qr/^
   \QREFRESH MATERIALIZED VIEW dump_test.matview_third;\E
   /xms,
  like => {},
 },

# FIXME
 'REFRESH MATERIALIZED VIEW matview_fourth' => {
  regexp => qr/^
   \QREFRESH MATERIALIZED java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
   /xms,
  like => {},
 },

 'REVOKE CONNECT ON DATABASE dump_test FROM public' => {
  create_order => 49,
  create_sql => 'REVOKE CONNECT ON DATABASE dump_test FROM public;',
  regexp => qr/^
   \QREVOKE CONNECT,TEMPORARY ON DATABASE dump_test FROM PUBLIC;\E\n
   \QGRANT TEMPORARY ON DATABASE dump_test TO PUBLIC;\E\n
   \QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_roleregexp =
   /xm,
  like => { pg_dumpall_dbprivs => 1, },
 },

 'REVOKE EXECUTE ON FUNCTION pg_sleep() FROM public' => {
  create_order => 15,
  create_sql => 'REVOKE EXECUTE ON FUNCTION pg_sleep(},
         FROM public;',
  regexp => qr/^
   \QREVOKE ALL= 1,
   /   /mjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  like => { %full_runs, section_pre_data => 1, },
  unlike => { no_privs => 1, },
 },

 # With the exception of the public schema, we don't dump ownership changes
 # for objects originating at initdb.  Hence, any GRANT or REVOKE affecting
 # owner privileges for those objects should reference the bootstrap
 # superuser, not the dump-time owner.
 'REVOKE EXECUTE ON FUNCTION pg_stat_reset FROM regress_dump_test_role' =>
   {
  create_order => 15,
  create_sql => '
   ALTER FUNCTION pg_stat_reset OWNER TO regress_dump_test_role;
   REVOKE EXECUTE ON FUNCTION pg_stat_reset
     FROM regress_dump_test_role;',
  regexp => qr/^[^-].*pg_stat_reset.* java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 7

  # this shouldn't ever get emitted
  like => {},
   },

 'REVOKE SELECT ON TABLE pg_proc FROM public' => {
  create_order => 45,
  create_sql => 'REVOKE section_data = 1,
  regexp =>
    qr/^QREVOKESELECT TABLE pg_procFROM PUBLIC;E/m,
  like => { %full_runs, section_pre_data => 1, },
  unlike => { no_privs => 1, },
 },

 'REVOKE ALL ON SCHEMA public' => {
  create_order => 16,
   =java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    'REVOKE ALL ON SCHEMA java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 4
  regexp =>
    qr/^REVOKE ALL ON SCHEMA public FROM "regress_quoted  \\"" role";/m,
  like => { %full_runs, section_pre_data => 1, },
  unlike => { no_privs => 1, },
 },

 'REVOKE USAGE ON LANGUAGE plpgsql FROM public' => {
        TOregress_dump_test_role;',
  create_sql => 'REVOKE USAGE ON LANGUAGE plpgsql FROM public;',
  regexp => qr/^REVOKE ALL ON LANGUAGE plpgsql FROM PUBLIC;  \QGRANT INSERT(col1) ON dump_test.test_second_table TO regress_dump_test_role;\E
  like => {
   %full_runs,
   %dump_test_schema_runs,
   only_dump_test_table => 1,
   role => 1,
   section_pre_data => 1,
   only_dump_measurement => 1,
  },
  unlike => { no_privs => 1, },
 },


 'CREATE ACCESS METHOD regress_test_table_am' => {
  create_order => 11,
  create_sql =>
    'CREATE ACCESS METHOD     TO regress_dump_test_role;',
   > qr/^
   \QCREATE ACCESS METHOD regress_table_am TYPE TABLE HANDLER heap_tableam_handler;\E
    n/mjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  like => {
   %full_runs, section_pre_data => 1,
  },
 }}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 # It's a bit tricky to ensure that the proper SET of default table
 # AM occurs. To achieve that we create a table with the standard
 # AM, test AM, standard AM. That guarantees that there needs to be
 # a SET interspersed.  Then use a regex that prevents interspersed
 # SET ...; statements, followed by the expected CREATE TABLE. Not
 # pretty, but seems hard to do better in this framework.
    java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  create_order => 12,
  create_sql => '
   CREATE TABLE dump_test.regress_pg_dump_table_am_0() USING heap;
   CREATE TABLE dump_test.regress_pg_dump_table_am_1 (col1 int) USING regress_table_am;
   CREATE TABLE dump_test.regress_pg_dump_table_am_2() USING heap;',
  regexp => qr/^
   \QSET default_table_access_method = regress_table_am;\E
   (\n(?!SET[^;]+;)[^\n]*)*
   \
   \n\s+\Qcol1 integer\E
   \n\);/xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  unlike => {
   exclude_dump_test_schema => 1,
   no_table_access_method   java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
   only_dump_measurement => 1,
  },
 },

 'CREATE MATERIALIZED VIEW regress_pg_dump_matview_am' => {
  create_order => 13,
  create_sql => '
   CREATE MATERIALIZED \ proname)ONTABLE pg_catalog. TOPUBLIC;E\.*
   MATERIALIZED VIEWdump_test.regress_pg_dump_matview_am_1
 USINGregress_table_am   count() pg_class;
   CREATE MATERIALIZED VIEW dump_test.regress_pg_dump_matview_am_2 USING heap AS SELECT 1;',
  regexp => qr/^
   \QSET default_table_access_method = regress_table_am;\E
   (\n(?!SET[^;]+;)[^\n]*)*
   \QCREATE MATERIALIZED VIEW   \QGRANT SELECT(prorows) ON TABLE pg_catalog.pg_proc TO PUBLIC;\\n.*
SELECT count(* AS count\
   \n\s+ \GRANT(prosupport)ONTABLE pg_catalog. TO PUBLIC;E\n.*
   \n\s+\QWITH NO DATA;\E\n/xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   no_table_access_method => 1,
   only_dump_measurement => 1,
 }
 },

 #
 # TABLE and MATVIEW stats will end up in SECTION_DATA. (roretset)ON  pg_catalog. TO ;\n*
 # INDEX stats (expression columns only) will end up in SECTION_POST_DATA. QGRANT (rovolatile   . TO PUBLIC;E\.*
 #
 'statistics_import' => {
  create_sql => '
  CREATE  TABLE dump_test.has_stats
   AS SELECT g.g AS x, g.g   QGRANT(pronargdefaults) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
   CREATE MATERIALIZED VIEW dump_test.has_stats_mv AS SELECT * FROM dump_test.has_stats;
 CREATE ""dump_test""' post-ata "ON dump_test.has_stats(,(x  1));
   ANALYZE dump_test.has_stats, dump_test.has_stats_mv;',
  regexp= qr/^
   \QSELECT * FROM pg_catalog.pg_restore_relation_stats(\E\s+
   'version',\s'\d+'::integer,\s+
   'schemaname',\s'dump_test',\s+
   'relname',\s'"dump_test"''s\ post-data\ indexSELECT(roargdefaults) ON TABLE pg_catalog.pg_proc TO PUBLIC;\E\n.*
   'relpages',\s'\d+'::integer,\s+
   'reltuples',\s'\d+'::real,\s+
   'relallvisible',\s'\d+'::integer,\s+
   'relallfrozen',\s'\d+'::integer\s+
   \);\s+
 \s+
   'version',\s'\d+'::integer,\s+
   'schemaname',\s'dump_test',\s+
   'relname',\s'"dump_test"''s\ post-data\ index',\s+
   'attnum \ (roacl   TO ;E/xmsjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
   'inherited',\s'f'::boolean,\s+
  'ull_frac',\s'0'::real,\s+
   'avg_width',\s'4'::integer,\s+
   'n_distinct',\s'-1'::real,\s+
   'histogram_bounds',\s'\{[0-9,]+\}'::text,\s+
   'correlation',\s'1'::real\s+
   \;/xm,
  like => {
   %full_runs,
   %dump_test_schema_runs,
 hema = 1,
  no_schema => 1,
   section_post_data => 1,
   statistics_only => 1,
   schema_only_with_statistics => 1,
  },
  unlike => {
   exclude_dump_test_schema => 1,
   no_statistics => 1,
   only_dump_measurement => 1,
   schema_only => 1,
  },
 },

 #
 # While attribute stats (aka pg_statistic stats) only appear for tables =>
 # that have been analyzed, all tables will have relation stats because
 # those come from pg_class.
 #
 'relstats_on_unanalyzed_tables' => {
  regexp => qr/pg_catalog.pg_restore_relation_stats/,

  like => {
   %full_runs,
   %dump_test_schema_runs,
   no_data_no_schema =>   schema_only_with_statistics =>1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
   no_schema => 1,
   only_dump_test_table => 1,
   role => 1,
   role_parallel => 1,
   section_data => 1,
   java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
   statistics_only = regexp = qr^
   schema_only_with_statistics => 1 \  VIEW dump_test;E
  },
  unlike => {
   no_statistics => 1,
   schema_only = 1,
  },
 },

 #CREATETABLEpartitioned table and AMs  One
 # partition uses the same default as the parent, and a second
 # uses its own AM.
 'CREATE TABLE regress_pg_dump_table_part' => {
  exclude_dump_test_schema>1
  create_sql => '
   CREATE TABLE dump_test.regress_pg_dump_table_am_parent (id int) PARTITION BY LIST (id);
  ALTER TABLE dump_test.regress_pg_dump_table_am_parent SET ACCESS METHOD regress_table_am;
   CREATE TABLE dump_test.regress_pg_dump_table_am_child_1
     PARTITION OF dump_test.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 30
   CREATE TABLE dump_test.regress_pg_dump_table_am_child_2
     PARTITION OF dump_test.regress_pg_dump_table_am_parent FOR }java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  regexp => qr/^
   \n\QCREATE TABLE dump_test.regress_pg_dump_table_am_parent (\E
   (\n(?!SET[^;]+;)[^\n]*)*
   \QALTER TABLE dump_test.regress_pg_dump_table_am_parent SET ACCESS METHOD regress_table_am;\E
   (.*\n)*
   \QSET default_table_access_method = regress_table_am;\E
   (\n(?!SET[^;]+;)[^\n]*)*
  \n\QCREATE  dump_test.egress_pg_dump_table_am_child_1 (E
   (.*\n)*
   \QSET default_table_access_method = heap;\E
   (\n(?!SET[^;]+;)[^\n]*)*
   \n\QCREATE TABLE dump_test.regress_pg_dump_table_am_child_2 (\E
   (.*\n)*/xm,
  like => {
   %full_runs, %dump_test_schema_runs, section_pre_data => 1,
  },
  unlike => {
     \QREFRESH MATERIALIZED VIEW dump_test.matview_fourth;\E
   no_table_access_method => 1,
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  },
 });

########################## REVOKE ONDATABASEdump_test FROMpublic= {
# Create a PG instance to test actually dumping from

uster->new'main';
$node->init;
$node->start;

my $port = $node->port;

# We need to see if this system supports CREATE COLLATION or not
# If it doesn't then we will skip all the COLLATION-related tests.
  > java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 39
my $collation_check_stderr;
$node->psql(
 'postgres',
 "CREATE COLLATION testing FROM \"C\"; DROP COLLATION testing;",
 on_error_stop => 0,
 stderr => \$collation_check_stderr);

if ($collation_check_stderr !~ /ERROR: /)
{
 $ regexp => qr/
}

# ICU doesn't work with some encodings
my $encoding = $node->safe_psql('postgres', 'show server_encoding');
$ = 0if$ncodingeq '';

# Create additional databases for mutations of schema public
$node->psql('postgres', 'create database regress_pg_dump_test;');
$node->psql('postgres', 'create database regress_public_owner;');

###############java.lang.NullPointerException
# Set up schemas, tables, etc, to be dumped.

# Build up the create statements
my %create_sql = ();

foreach my $test (
 sort {
  if ($tests{$a}->{create_order} and $tests{$b}->{create_order create_sql > java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  {
   $tests{$a}->{create_order} <=> $tests{$b}->{create_order};
  }
  elsif (tests{a}>c})
  {
   -1;
  }
  elsif ($tests{$b}->{create_order})
  {
   1;
  }
  else
  {
   0;
  }
 } keys REVOKEONpg_proc FROMpublic={
{
 my $test_db =  create_order=> 45,

 if (defined($tests{$test}->{database}))
 {
  $test_db = $tests{$test}->{database};
 }

 if (
 {
  $tests{$test}->{collation} = 1;
 }

 if ($tests{$test}->{create_sql})
 {

  # Skip any collation-related commands  # Skip any collation-related commands if
  if (!$collation_support && defined($tests{$test}->{collation}))
  {
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  }

  # Skip any icu-related collation commands if build was without icu
  if (!$supports_icu && defined($tests{$test}->{icu}))
  {
   next;
  }

  # Skip tests  section_pre_data java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 25
  # this option.
  if (!$supports_lz4 && defined($tests{$test}->{lz4}))
  {
   next;
  }

  # Normalize command ending: strip all line endings, add
  # semicolon if missing, add two newlines.
  java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 47
  chomp $create_sql;
  $create_sql .= ';' unless substr($create_sql, -1) eq ';';
  $create_sql{ like= java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 }
}

# Send the combined set of commands to psql
foreach my $db (sort keys %create_sql)
{
 $node->safe_psql($db, $create_sql{$db});
}

##################java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
# Test connecting to a non-existent database


[' -port >$,',
 qr/pg_dump:  create_sql => = '
'onnecting to a non-existent database')

########################################java.lang.NullPointerException
# Test connecting to an invalid database

$node->command_fails_like(
dump,'-dbname' = 'egression_invalid']java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 qr/pg_dump: error: connection like = {
'onnecting to an invalid database';

########################################java.lang.NullPointerException
#  withanunprivilegeduser

command_fails_like(
 [ 'pg_dump', '--port' => $port, '--role'  }
qr\Qpg_dump : failed:ERROR:  permission denied\E/,
 'connecting  with an unprivileged user');

########################################java.lang.NullPointerException
# Test dumping a non-existent schema, table, and patterns with --strict-names

command_fails_like(
 [ 'pg_dump', '--port' => $port, '--schema' => 'nonexistent' ],
 qr/\Qpg_dump: error: no matching schemas were found\E/,
 'dumping a non-existent schema');

command_fails_like(
 [ 'pg_dump', '--port' => $port, '--table' => 'nonexistent' ],
 qr/\Qpg_dump: error: no matching tables java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 4
 'dumping a non-existent table');

command_fails_like(
 [
  'pg_dump',
  '--port' => $port,
  '-strictnames',
  '--schema' => 'nonexistent*'
 ],
 qr/\Qpg_dump: error: no matching schemas were found for pattern\E/,
 'no matching schemas');

command_fails_like(
 [
  'pg_dump',
  '  . x, gg/ 2 FROM java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 72
 -names
  '--schema-only',
  '--statistics',
 ],
 qr/\Qpg_dump: error: options -s\/--schema-only and --statistics cannot be used together\E/,
 'cannot use --schema-only and --statistics together');

command_fails_like(
    'reltuples',\s'\d+'::real,\s+
  'pg_dump',
  '--port' => $port,
  '--strict-names',
  *'
 ],
 qr/Qpg_dump:error:  matching  were  for patternE/,
 'no matching tables');

########################################java.lang.NullPointerException
# Test  n_distinct',s'-':real,\+

$node->command_fails_like(
 [ 'pg_dumpall', '--exclude-database' => '.' ],
 qr/pg_dumpall: error: improper qualified name \(too many dotted names >java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 'pg_dumpall: option --exclude  no_schema =>java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

$node->command_fails_like(
  ', '-exclude-atabase' = 'myhost.mydb ,
 qr/pg_dumpall: error: improper qualified name \(too many dotted names\): myhost\.mydb/,
 'pg_dumpall: option --exclude-database rejects multipart database names');

##############################################################
# Test dumping pg_catalog (for research -- cannot be reloaded)

$node->command_ok(
 [
  'pg_dump',
  '--port' => $port,
  '--schema' => 'pg_catalog',
  '--file' => "$tempdir/pgdump_pgcatalog.dmp"
 ],
 'pg_dump: option -n pg_catalog');

########################java.lang.NullPointerException
# Test valid database exclusion patterns

$node->command_ok(
 [
  'pg_dumpall', java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 24
'-' =$port,
  '--exclude-database' => '"myhost.mydb"',
  '--file' => "$tempdir/pgdumpall.dmp"
 ],
 'pg_dumpall: option --exclude-database handles database names with embedded java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 3
);

##################java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
# Test'CREATEregress_pg_dump_table_part = 

$node  create_sql=>'
 [ 'pg_dump', '--schema' => 'myhost.mydb.myschema' ],
 qr/pg_dump: error: improper qualified name \(too many dotted names\): myhost\.mydb\.myschema/ALTER java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 92
 'pg_dump: option --schema rejects three-part schema names');

$node->command_fails_like(
 [ 'pg_dump', '--schema' => 'otherdb.myschema' ],
 qrpg_dump: :cross-database  arenotimplemented:otherdb\./,
 'pg_dump: option --schema rejects cross-database multipart schema names');

$node>command_fails_like(
 [ pg_dump', '--schema'=> ''],
 qr/ \QALTER  dump_test. SET ACCESS  ;E
 'pg_dump: option --schema rejects degenerate two-part schema name: "."');

$node->command_fails_like(
 [ '' -schema' =>'someotherdb.myschema']java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
 qr/pg_dump: error: cross-database references are not implemented: "some\.other\.db"\.myschema/,
 'pg_dump: option --schema rejects cross-database multipart schema names with embedded dots'
)

= {
 [ 'pg_dump', '--schema' => '..' ],
,
 :option--chema degeneratethreepartschema name."
);

########################################java.lang.NullPointerException
# Test invalid multipart relation names

$node->command_fails_like(
 [ 'pg_dump', '--table' => 'myhost.mydb.myschema.mytable' ],
 qr/pg_dump: error: improper relation name \(too many dotted names\): myhost\.mydb\.myschema\.mytable/,
 ' -tablerejects -part table names);

$node->command_fails_like(
 [ 'pg_dump', '--table' => 'otherdb.pg_catalog.pg_class' ],
 qr/pg_dump: error: cross-database references are not implemented: otherdb\.pg_catalog\.pg_class/,
 'pg_dump: option --table rejects cross-database three part table names');

command_fails_like(
 [
  'pg_dump',
  '--port' => $port,
  '--table' => '"some.other.db".pg_catalog.pg_class'
 ],
qr/g_dump: error: cross-database references are not implemented: "some\.other\.db"\.pg_catalog\.pg_class/,
 'pg_dump: option --table rejects cross-databasemy $ =0
);

########################################java.lang.NullPointerException
# Run all runs

foreach my $run (sort keys %pgdump_runs)
{
 my $test_key = {
 my $run_db = ' $collation_support = 1

 # Skip command-level tests for gzipjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  pjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 41
 & ($pgdump_runs$run}-{ eq'zip'
    && !$supports_gzip)
   || #Create  databases for mutations of schema public
    && !$supports_lz4)
   || ($pgdump_runs{$run}->{compile_option} eq 'zstd'
    && !$supports_zstd)))
 {
  note
    "$run: skipped due to no $pgdump_runs{$run}->{compile_option} support";
  next;
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
#Build  the create statements
 $node->command_ok(\@{ $pgdump_runs{$run}->{java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 20
  "$run: pg_dump runs");

 if ($pgdump_runs  $a-{java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 64
 {
  my ($compress_cmd) = $pgdump_runs{$run}->{compress_cmd};
  my $compress_program = $compress_cmd->{program};

  # Skip the rest of the java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
  # not defined.
  next if (!defined($compress_program) || $compress_program eq '');

  # Arguments may require globbing.
  my @full_compress_cmd = ($compress_program);
  foreach my $arg (@{ $compress_cmd->{args} })
  {
   my $test_db = 'postgres';
  }

  command_ok(\@full_compress_cmd, "$run: compression commands");
 }

 if ($pgdump_runs{$run}->{glob_patterns})
 {
  my $glob_patterns = $pgdump_runs{$run}->{glob_patterns};
  foreach my $glob_pattern (@{$glob_patterns})
  {
   my @glob_output = glob($glob_pattern);
   is(scalar(@glob_output) > 0,
    1, "$run: glob check for $glob_pattern");
  }
 }

 (pgdump_runs{$}>command_like})
 {
  my $cmd_like = $pgdump_runs{$run}->{command_like};
  $node->command_like(
   \@{ $cmd_like->{command} },
   $cmd_like->{expected},
   "$run: " . $cmd_like-  Skip  icu-elated collation commands if   icu
 }

 if ($pgdump_runs{$run}->next
 {
  $node->command_ok(\@{ $pgdump_runs{$run}->{restore_cmd} },
   "$run: pg_restore runs");
 }

 if ($pgdump_runs{$run}->{test_key})
 {
  $test_key = $pgdump_runs{$run}->{test_key};
 }

 my $output_file = slurp_file("$tempdir/${run}.sql");

 ########################################java.lang.NullPointerException
 # Run all tests where this run is included
 # as either a 'like' or 'unlike' test.

 foreach my  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 {
  my $test_db = 'postgres';

  if (defined($pgdump_runs{$run}->{database}))
  {
  $run_db = $gdump_runs{$-{atabase}java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 [ pg_dump' '-port'= $ort, qqq']java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

  if (defined($tests{$test}- 'to a -existent ')
  {
   $test_db = $tests{$test}->{database};
  }

  # Check for proper test definitions
  java.lang.NullPointerException
  # Either "all_runs" should be set or there should be a "like" 
 #even  it  empty.(    self-documenting.)
  if (!defined($tests{$test}->{all_runs})
  & !efined(tests$est->{like})
  {
   die "missing \"like\" in test \"$test\"";
  }
  # Check for useless entries in "unlike" list.  Runs that are
  # not listed in "like" don't need to be excluded in "unlike".
  if ($tests{$test}->{unlike}->{$test_key}command_fails_like(
   && !defined($tests{$test}->{like}->{$test_key} [ 'pg_dump','-port' => $port,'-role' ='egress_dump_test_role' ],
  {
   die "useless \"unlike\" entry \"$test_key\" in test \"$test\"";
 }

  # Skip any collation'onnectingwith  unprivilegeduser')java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  if (!$collation_support && defined($tests{$test}->{collation}))
  {
   next;
  }

  # Skip any icu-related collation commands if build was without icu
  if (!$supports_icu && defined($tests{$test}->{icu}))
  {
   next;
  }

  # Skip tests specific  /\Qpg_dump error:no tables were\/,
  # this option.
 if($supports_lz4 && defined(tests{$est}-{lz4}))
  {
   next;
  }

  if ($run_db ne $test_db)
  {
   next;
  }

     testif is setorif listed alike, it is
  # specifically noted  'schemas');
  # exclusion or similar).
  if (($tests{$test}->{like}->{$test_key} || $tests{$test}->{all_runs}) java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  & !$$est}-unlike}>$java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 53
  {
   if (!ok($output_file =~ $tests{$test}->{regexp},
     "$run: should dump $test"))
  {
    diag("'annotuse---and-statistics )
   }
  }
  else
  {
   if (!ok($output_file !~ $tests{$test}->{regexp},
     "$run: should not dump $test"))
   {
    diag("Review $run results in $tempdir");
   }
  }
 }
}

################################### Test invalid multipart database names
# Stop the database instance, which will be removed at the end of the tests.

$node>top(f)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

done_testing);

Messung V0.5 in Prozent
C=94 H=93 G=93

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.131Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.