diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/pg_basebackup/t/010_pg_basebackup.pl | 10 | ||||
-rw-r--r-- | src/bin/pg_controldata/t/001_pg_controldata.pl | 3 | ||||
-rw-r--r-- | src/bin/pg_dump/t/001_basic.pl | 35 | ||||
-rw-r--r-- | src/bin/pg_dump/t/002_pg_dump.pl | 84 | ||||
-rw-r--r-- | src/bin/pg_resetwal/t/002_corrupted.pl | 6 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/001_basic.pl | 4 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/003_extrafiles.pl | 3 | ||||
-rw-r--r-- | src/bin/pgbench/t/001_pgbench_with_server.pl | 16 | ||||
-rw-r--r-- | src/bin/pgbench/t/002_pgbench_no_server.pl | 3 | ||||
-rw-r--r-- | src/bin/scripts/t/010_clusterdb.pl | 2 | ||||
-rw-r--r-- | src/bin/scripts/t/040_createuser.pl | 8 | ||||
-rw-r--r-- | src/bin/scripts/t/102_vacuumdb_stages.pl | 4 |
12 files changed, 89 insertions, 89 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index 1c80ff7491..834c4050c5 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -420,13 +420,15 @@ rmtree("$tempdir/backupxs_slot"); is( $node->safe_psql( 'postgres', -q{SELECT slot_name FROM pg_replication_slots WHERE slot_name = 'slot0'}), + q{SELECT slot_name FROM pg_replication_slots WHERE slot_name = 'slot0'} + ), 'slot0', 'replication slot was created'); isnt( $node->safe_psql( 'postgres', -q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot0'}), + q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot0'} + ), '', 'restart LSN of new slot is not null'); @@ -468,10 +470,10 @@ rmtree("$tempdir/backupxs_sl_R"); # create tables to corrupt and get their relfilenodes my $file_corrupt1 = $node->safe_psql('postgres', -q{SELECT a INTO corrupt1 FROM generate_series(1,10000) AS a; ALTER TABLE corrupt1 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt1')} + q{SELECT a INTO corrupt1 FROM generate_series(1,10000) AS a; ALTER TABLE corrupt1 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt1')} ); my $file_corrupt2 = $node->safe_psql('postgres', -q{SELECT b INTO corrupt2 FROM generate_series(1,2) AS b; ALTER TABLE corrupt2 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt2')} + q{SELECT b INTO corrupt2 FROM generate_series(1,2) AS b; ALTER TABLE corrupt2 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt2')} ); # set page header and block sizes diff --git a/src/bin/pg_controldata/t/001_pg_controldata.pl b/src/bin/pg_controldata/t/001_pg_controldata.pl index c641c9c5f7..a9862aec1b 100644 --- a/src/bin/pg_controldata/t/001_pg_controldata.pl +++ b/src/bin/pg_controldata/t/001_pg_controldata.pl @@ -33,8 +33,7 @@ close $fh; command_checks_all( [ 'pg_controldata', $node->data_dir ], 0, - [ -qr/WARNING: Calculated CRC checksum does not match value stored in file/, + [ qr/WARNING: Calculated CRC checksum does not match value stored in file/, qr/WARNING: invalid WAL segment size/ ], [qr/^$/], 'pg_controldata with corrupted pg_control'); diff --git a/src/bin/pg_dump/t/001_basic.pl b/src/bin/pg_dump/t/001_basic.pl index 257fb08ccb..8be5770ba4 100644 --- a/src/bin/pg_dump/t/001_basic.pl +++ b/src/bin/pg_dump/t/001_basic.pl @@ -45,35 +45,36 @@ command_fails_like( command_fails_like( [ 'pg_dump', '-s', '-a' ], -qr/\Qpg_dump: options -s\/--schema-only and -a\/--data-only cannot be used together\E/, -'pg_dump: options -s/--schema-only and -a/--data-only cannot be used together' + qr/\Qpg_dump: options -s\/--schema-only and -a\/--data-only cannot be used together\E/, + 'pg_dump: options -s/--schema-only and -a/--data-only cannot be used together' ); command_fails_like( [ 'pg_restore', '-s', '-a' ], -qr/\Qpg_restore: options -s\/--schema-only and -a\/--data-only cannot be used together\E/, -'pg_restore: options -s/--schema-only and -a/--data-only cannot be used together' + qr/\Qpg_restore: options -s\/--schema-only and -a\/--data-only cannot be used together\E/, + 'pg_restore: options -s/--schema-only and -a/--data-only cannot be used together' ); command_fails_like( [ 'pg_restore', '-d', 'xxx', '-f', 'xxx' ], -qr/\Qpg_restore: options -d\/--dbname and -f\/--file cannot be used together\E/, + qr/\Qpg_restore: options -d\/--dbname and -f\/--file cannot be used together\E/, 'pg_restore: options -d/--dbname and -f/--file cannot be used together'); command_fails_like( [ 'pg_dump', '-c', '-a' ], -qr/\Qpg_dump: options -c\/--clean and -a\/--data-only cannot be used together\E/, + qr/\Qpg_dump: options -c\/--clean and -a\/--data-only cannot be used together\E/, 'pg_dump: options -c/--clean and -a/--data-only cannot be used together'); command_fails_like( [ 'pg_restore', '-c', '-a' ], -qr/\Qpg_restore: options -c\/--clean and -a\/--data-only cannot be used together\E/, -'pg_restore: options -c/--clean and -a/--data-only cannot be used together'); + qr/\Qpg_restore: options -c\/--clean and -a\/--data-only cannot be used together\E/, + 'pg_restore: options -c/--clean and -a/--data-only cannot be used together' +); command_fails_like( [ 'pg_dump', '--inserts', '-o' ], -qr/\Qpg_dump: options --inserts\/--column-inserts and -o\/--oids cannot be used together\E/, -'pg_dump: options --inserts/--column-inserts and -o/--oids cannot be used together' + qr/\Qpg_dump: options --inserts\/--column-inserts and -o\/--oids cannot be used together\E/, + 'pg_dump: options --inserts/--column-inserts and -o/--oids cannot be used together' ); command_fails_like( @@ -103,7 +104,7 @@ command_fails_like( command_fails_like( [ 'pg_restore', '--single-transaction', '-j3' ], -qr/\Qpg_restore: cannot specify both --single-transaction and multiple jobs\E/, + qr/\Qpg_restore: cannot specify both --single-transaction and multiple jobs\E/, 'pg_restore: cannot specify both --single-transaction and multiple jobs'); command_fails_like( @@ -124,20 +125,20 @@ command_fails_like( # pg_dumpall command-line argument checks command_fails_like( [ 'pg_dumpall', '-g', '-r' ], -qr/\Qpg_dumpall: options -g\/--globals-only and -r\/--roles-only cannot be used together\E/, -'pg_dumpall: options -g/--globals-only and -r/--roles-only cannot be used together' + qr/\Qpg_dumpall: options -g\/--globals-only and -r\/--roles-only cannot be used together\E/, + 'pg_dumpall: options -g/--globals-only and -r/--roles-only cannot be used together' ); command_fails_like( [ 'pg_dumpall', '-g', '-t' ], -qr/\Qpg_dumpall: options -g\/--globals-only and -t\/--tablespaces-only cannot be used together\E/, -'pg_dumpall: options -g/--globals-only and -t/--tablespaces-only cannot be used together' + qr/\Qpg_dumpall: options -g\/--globals-only and -t\/--tablespaces-only cannot be used together\E/, + 'pg_dumpall: options -g/--globals-only and -t/--tablespaces-only cannot be used together' ); command_fails_like( [ 'pg_dumpall', '-r', '-t' ], -qr/\Qpg_dumpall: options -r\/--roles-only and -t\/--tablespaces-only cannot be used together\E/, -'pg_dumpall: options -r/--roles-only and -t/--tablespaces-only cannot be used together' + qr/\Qpg_dumpall: options -r\/--roles-only and -t\/--tablespaces-only cannot be used together\E/, + 'pg_dumpall: options -r/--roles-only and -t/--tablespaces-only cannot be used together' ); command_fails_like( diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index 5202226f08..f2b23464d0 100644 --- a/src/bin/pg_dump/t/002_pg_dump.pl +++ b/src/bin/pg_dump/t/002_pg_dump.pl @@ -533,7 +533,7 @@ my %tests = ( 'ALTER TABLE ONLY test_table ALTER COLUMN col1 SET STATISTICS 90' => { create_order => 93, create_sql => -'ALTER TABLE dump_test.test_table ALTER COLUMN col1 SET STATISTICS 90;', + 'ALTER TABLE dump_test.test_table ALTER COLUMN col1 SET STATISTICS 90;', regexp => qr/^ \QALTER TABLE ONLY dump_test.test_table ALTER COLUMN col1 SET STATISTICS 90;\E\n /xm, @@ -549,7 +549,7 @@ my %tests = ( 'ALTER TABLE ONLY test_table ALTER COLUMN col2 SET STORAGE' => { create_order => 94, create_sql => -'ALTER TABLE dump_test.test_table ALTER COLUMN col2 SET STORAGE EXTERNAL;', + 'ALTER TABLE dump_test.test_table ALTER COLUMN col2 SET STORAGE EXTERNAL;', regexp => qr/^ \QALTER TABLE ONLY dump_test.test_table ALTER COLUMN col2 SET STORAGE EXTERNAL;\E\n /xm, @@ -565,7 +565,7 @@ my %tests = ( 'ALTER TABLE ONLY test_table ALTER COLUMN col3 SET STORAGE' => { create_order => 95, create_sql => -'ALTER TABLE dump_test.test_table ALTER COLUMN col3 SET STORAGE MAIN;', + 'ALTER TABLE dump_test.test_table ALTER COLUMN col3 SET STORAGE MAIN;', regexp => qr/^ \QALTER TABLE ONLY dump_test.test_table ALTER COLUMN col3 SET STORAGE MAIN;\E\n /xm, @@ -581,7 +581,7 @@ my %tests = ( 'ALTER TABLE ONLY test_table ALTER COLUMN col4 SET n_distinct' => { create_order => 95, create_sql => -'ALTER TABLE dump_test.test_table ALTER COLUMN col4 SET (n_distinct = 10);', + 'ALTER TABLE dump_test.test_table ALTER COLUMN col4 SET (n_distinct = 10);', regexp => qr/^ \QALTER TABLE ONLY dump_test.test_table ALTER COLUMN col4 SET (n_distinct=10);\E\n /xm, @@ -594,7 +594,7 @@ my %tests = ( exclude_dump_test_schema => 1, exclude_test_table => 1, }, }, -'ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION measurement_y2006m2' + 'ALTER TABLE ONLY dump_test.measurement ATTACH PARTITION measurement_y2006m2' => { regexp => qr/^ \QALTER TABLE ONLY dump_test.measurement ATTACH PARTITION dump_test_second_schema.measurement_y2006m2 \E @@ -674,7 +674,7 @@ my %tests = ( 'ALTER TABLE test_third_table OWNER TO' => { regexp => -qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m, + qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m, like => { %full_runs, role => 1, @@ -691,7 +691,7 @@ qr/^ALTER TABLE dump_test_second_schema.test_third_table OWNER TO .*;/m, 'ALTER TABLE measurement_y2006m2 OWNER TO' => { regexp => -qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m, + qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m, like => { %full_runs, role => 1, @@ -709,7 +709,7 @@ qr/^ALTER TABLE dump_test_second_schema.measurement_y2006m2 OWNER TO .*;/m, 'ALTER TEXT SEARCH CONFIGURATION alt_ts_conf1 OWNER TO' => { regexp => -qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m, + qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { @@ -718,7 +718,7 @@ qr/^ALTER TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 OWNER TO .*;/m, 'ALTER TEXT SEARCH DICTIONARY alt_ts_dict1 OWNER TO' => { regexp => -qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m, + qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { @@ -730,7 +730,7 @@ qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m, 'BLOB create (using lo_from_bytea)' => { create_order => 50, create_sql => -'SELECT pg_catalog.lo_from_bytea(0, \'\\x310a320a330a340a350a360a370a380a390a\');', + 'SELECT pg_catalog.lo_from_bytea(0, \'\\x310a320a330a340a350a360a370a380a390a\');', regexp => qr/^SELECT pg_catalog\.lo_create\('\d+'\);/m, like => { %full_runs, @@ -841,7 +841,7 @@ qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m, create_sql => 'COMMENT ON CONVERSION dump_test.test_conversion IS \'comment on test conversion\';', regexp => -qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversion';/m, + qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversion';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -851,7 +851,7 @@ qr/^COMMENT ON CONVERSION dump_test.test_conversion IS 'comment on test conversi create_sql => 'COMMENT ON COLLATION test0 IS \'comment on test0 collation\';', regexp => -qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m, + qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m, collation => 1, like => { %full_runs, section_pre_data => 1, }, }, @@ -899,7 +899,7 @@ qr/^COMMENT ON COLLATION public.test0 IS 'comment on test0 collation';/m, 'COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS \'comment on text search configuration\';', regexp => -qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on text search configuration';/m, + qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on text search configuration';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -910,7 +910,7 @@ qr/^COMMENT ON TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 IS 'comment on t 'COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS \'comment on text search dictionary\';', regexp => -qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text search dictionary';/m, + qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text search dictionary';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -920,7 +920,7 @@ qr/^COMMENT ON TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 IS 'comment on text create_sql => 'COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS \'comment on text search parser\';', regexp => -qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text search parser';/m, + qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text search parser';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -930,7 +930,7 @@ qr/^COMMENT ON TEXT SEARCH PARSER dump_test.alt_ts_prs1 IS 'comment on text sear create_sql => 'COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS \'comment on text search template\';', regexp => -qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text search template';/m, + qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text search template';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -950,7 +950,7 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 IS 'comment on text s create_sql => 'COMMENT ON TYPE dump_test.textrange IS \'comment on range type\';', regexp => -qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m, + qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -970,7 +970,7 @@ qr/^COMMENT ON TYPE dump_test.textrange IS 'comment on range type';/m, create_sql => 'COMMENT ON TYPE dump_test.undefined IS \'comment on undefined type\';', regexp => -qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m, + qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -1095,7 +1095,7 @@ qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m, 'COPY test_fifth_table' => { create_order => 54, create_sql => -'INSERT INTO dump_test.test_fifth_table VALUES (NULL, true, false, \'11001\'::bit(5), \'NaN\');', + 'INSERT INTO dump_test.test_fifth_table VALUES (NULL, true, false, \'11001\'::bit(5), \'NaN\');', regexp => qr/^ \QCOPY dump_test.test_fifth_table (col1, col2, col3, col4, col5) FROM stdin;\E \n\\N\tt\tf\t11001\tNaN\n\\\.\n @@ -1113,7 +1113,7 @@ qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m, 'COPY test_table_identity' => { create_order => 54, create_sql => -'INSERT INTO dump_test.test_table_identity (col2) VALUES (\'test\');', + 'INSERT INTO dump_test.test_table_identity (col2) VALUES (\'test\');', regexp => qr/^ \QCOPY dump_test.test_table_identity (col1, col2) FROM stdin;\E \n1\ttest\n\\\.\n @@ -1153,12 +1153,12 @@ qr/^COMMENT ON TYPE dump_test.undefined IS 'comment on undefined type';/m, 'INSERT INTO test_fifth_table' => { regexp => -qr/^\QINSERT INTO dump_test.test_fifth_table (col1, col2, col3, col4, col5) VALUES (NULL, true, false, B'11001', 'NaN');\E/m, + qr/^\QINSERT INTO dump_test.test_fifth_table (col1, col2, col3, col4, col5) VALUES (NULL, true, false, B'11001', 'NaN');\E/m, like => { column_inserts => 1, }, }, 'INSERT INTO test_table_identity' => { regexp => -qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUES (1, 'test');\E/m, + qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUES (1, 'test');\E/m, like => { column_inserts => 1, }, }, 'CREATE ROLE regress_dump_test_role' => { @@ -1189,9 +1189,9 @@ qr/^\QINSERT INTO dump_test.test_table_identity (col1, col2) OVERRIDING SYSTEM V 'CREATE CAST FOR timestamptz' => { create_order => 51, create_sql => -'CREATE CAST (timestamptz AS interval) WITH FUNCTION age(timestamptz) AS ASSIGNMENT;', + 'CREATE CAST (timestamptz AS interval) WITH FUNCTION age(timestamptz) AS ASSIGNMENT;', regexp => -qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog\.age\(timestamp with time zone\) AS ASSIGNMENT;/m, + qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog\.age\(timestamp with time zone\) AS ASSIGNMENT;/m, like => { %full_runs, section_pre_data => 1, }, }, 'CREATE DATABASE postgres' => { @@ -1244,9 +1244,9 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog 'CREATE CONVERSION dump_test.test_conversion' => { create_order => 78, create_sql => -'CREATE DEFAULT CONVERSION dump_test.test_conversion FOR \'LATIN1\' TO \'UTF8\' FROM iso8859_1_to_utf8;', + 'CREATE DEFAULT CONVERSION dump_test.test_conversion FOR \'LATIN1\' TO \'UTF8\' FROM iso8859_1_to_utf8;', regexp => -qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;\E/xm, + qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;\E/xm, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { exclude_dump_test_schema => 1, }, }, @@ -1437,7 +1437,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' 'CREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1' => { create_order => 80, create_sql => -'CREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 (copy=english);', + 'CREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 (copy=english);', regexp => qr/^ \QCREATE TEXT SEARCH CONFIGURATION dump_test.alt_ts_conf1 (\E\n \s+\QPARSER = pg_catalog."default" );\E/xm, @@ -1512,7 +1512,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' 'CREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1' => { create_order => 81, create_sql => -'CREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 (lexize=dsimple_lexize);', + 'CREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 (lexize=dsimple_lexize);', regexp => qr/^ \QCREATE TEXT SEARCH TEMPLATE dump_test.alt_ts_temp1 (\E\n \s+\QLEXIZE = dsimple_lexize );\E/xm, @@ -1538,7 +1538,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' 'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1' => { create_order => 83, create_sql => -'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (template=simple);', + 'CREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (template=simple);', regexp => qr/^ \QCREATE TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 (\E\n \s+\QTEMPLATE = pg_catalog.simple );\E\n @@ -1650,7 +1650,7 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' 'CREATE FOREIGN TABLE dump_test.foreign_table SERVER s1' => { create_order => 88, create_sql => -'CREATE FOREIGN TABLE dump_test.foreign_table (c1 int options (column_name \'col1\')) + 'CREATE FOREIGN TABLE dump_test.foreign_table (c1 int options (column_name \'col1\')) SERVER s1 OPTIONS (schema_name \'x1\');', regexp => qr/ \QCREATE FOREIGN TABLE dump_test.foreign_table (\E\n @@ -1676,9 +1676,9 @@ qr/^\QCREATE DEFAULT CONVERSION dump_test.test_conversion FOR 'LATIN1' TO 'UTF8' 'CREATE TRANSFORM FOR int' => { create_order => 34, create_sql => -'CREATE TRANSFORM FOR int LANGUAGE SQL (FROM SQL WITH FUNCTION varchar_transform(internal), TO SQL WITH FUNCTION int4recv(internal));', + 'CREATE TRANSFORM FOR int LANGUAGE SQL (FROM SQL WITH FUNCTION varchar_transform(internal), TO SQL WITH FUNCTION int4recv(internal));', regexp => -qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog\.varchar_transform\(internal\), TO SQL WITH FUNCTION pg_catalog\.int4recv\(internal\)\);/m, + qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog\.varchar_transform\(internal\), TO SQL WITH FUNCTION pg_catalog\.int4recv\(internal\)\);/m, like => { %full_runs, section_pre_data => 1, }, }, 'CREATE LANGUAGE pltestlang' => { @@ -2215,7 +2215,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog catch_all => 'CREATE ... commands', create_order => 93, create_sql => -'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);', + 'ALTER TABLE dump_test.measurement ADD PRIMARY KEY (city_id, logdate);', regexp => qr/^ \QALTER TABLE ONLY dump_test.measurement\E \n^\s+ \QADD CONSTRAINT measurement_pkey PRIMARY KEY (city_id, logdate);\E @@ -2443,7 +2443,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog 'GRANT USAGE ON DOMAIN dump_test.us_postal_code' => { create_order => 72, create_sql => -'GRANT USAGE ON DOMAIN dump_test.us_postal_code TO regress_dump_test_role;', + 'GRANT USAGE ON DOMAIN dump_test.us_postal_code TO regress_dump_test_role;', regexp => qr/^ \QGRANT ALL ON TYPE dump_test.us_postal_code TO regress_dump_test_role;\E /xm, @@ -2482,7 +2482,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog 'GRANT USAGE ON TYPE dump_test.textrange - RANGE' => { create_order => 67, create_sql => -'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;', + 'GRANT USAGE ON TYPE dump_test.textrange TO regress_dump_test_role;', regexp => qr/^ \QGRANT ALL ON TYPE dump_test.textrange TO regress_dump_test_role;\E /xm, @@ -2506,7 +2506,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog create_sql => 'GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;', regexp => -qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m, + qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m, like => { %full_runs, %dump_test_schema_runs, @@ -2523,7 +2523,7 @@ qr/^GRANT SELECT ON TABLE dump_test.test_table TO regress_dump_test_role;/m, TABLE dump_test_second_schema.test_third_table TO regress_dump_test_role;', regexp => -qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_dump_test_role;/m, + qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_dump_test_role;/m, like => { %full_runs, role => 1, @@ -2550,7 +2550,7 @@ qr/^GRANT SELECT ON TABLE dump_test_second_schema.test_third_table TO regress_du TABLE dump_test.measurement TO regress_dump_test_role;', regexp => -qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m, + qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m, like => { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, unlike => { @@ -2563,7 +2563,7 @@ qr/^GRANT SELECT ON TABLE dump_test.measurement TO regress_dump_test_role;/m, TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;', regexp => -qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m, + qr/^GRANT SELECT ON TABLE dump_test_second_schema.measurement_y2006m2 TO regress_dump_test_role;/m, like => { %full_runs, role => 1, @@ -2937,8 +2937,8 @@ foreach my $db (sort keys %create_sql) command_fails_like( [ 'pg_dump', '-p', "$port", 'qqq' ], -qr/\Qpg_dump: [archiver (db)] connection to database "qqq" failed: FATAL: database "qqq" does not exist\E/, -'pg_dump: [archiver (db)] connection to database "qqq" failed: FATAL: database "qqq" does not exist' + qr/\Qpg_dump: [archiver (db)] connection to database "qqq" failed: FATAL: database "qqq" does not exist\E/, + 'pg_dump: [archiver (db)] connection to database "qqq" failed: FATAL: database "qqq" does not exist' ); ######################################### @@ -2946,7 +2946,7 @@ qr/\Qpg_dump: [archiver (db)] connection to database "qqq" failed: FATAL: datab command_fails_like( [ 'pg_dump', '-p', "$port", '--role=regress_dump_test_role' ], -qr/\Qpg_dump: [archiver (db)] query failed: ERROR: permission denied for\E/, + qr/\Qpg_dump: [archiver (db)] query failed: ERROR: permission denied for\E/, 'pg_dump: [archiver (db)] query failed: ERROR: permission denied for'); ######################################### diff --git a/src/bin/pg_resetwal/t/002_corrupted.pl b/src/bin/pg_resetwal/t/002_corrupted.pl index 54bdbfd661..ab840d1185 100644 --- a/src/bin/pg_resetwal/t/002_corrupted.pl +++ b/src/bin/pg_resetwal/t/002_corrupted.pl @@ -31,8 +31,7 @@ command_checks_all( [ 'pg_resetwal', '-n', $node->data_dir ], 0, [qr/pg_control version number/], - [ -qr/pg_resetwal: pg_control exists but is broken or wrong version; ignoring it/ + [ qr/pg_resetwal: pg_control exists but is broken or wrong version; ignoring it/ ], 'processes corrupted pg_control all zeroes'); @@ -47,7 +46,6 @@ command_checks_all( [ 'pg_resetwal', '-n', $node->data_dir ], 0, [qr/pg_control version number/], - [ -qr/\Qpg_resetwal: pg_control specifies invalid WAL segment size (0 bytes); proceed with caution\E/ + [ qr/\Qpg_resetwal: pg_control specifies invalid WAL segment size (0 bytes); proceed with caution\E/ ], 'processes zero WAL segment size'); diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index 9a0ce09a77..87bb71e8ed 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -35,7 +35,7 @@ sub run_test master_psql( "INSERT INTO trunc_tbl values ('in master, before promotion')"); master_psql( -"INSERT INTO tail_tbl SELECT g, 'in master, before promotion: ' || g FROM generate_series(1, 10000) g" + "INSERT INTO tail_tbl SELECT g, 'in master, before promotion: ' || g FROM generate_series(1, 10000) g" ); master_psql('CHECKPOINT'); @@ -54,7 +54,7 @@ sub run_test # Insert enough rows to trunc_tbl to extend the file. pg_rewind should # truncate it back to the old size. master_psql( -"INSERT INTO trunc_tbl SELECT 'in master, after promotion: ' || g FROM generate_series(1, 10000) g" + "INSERT INTO trunc_tbl SELECT 'in master, after promotion: ' || g FROM generate_series(1, 10000) g" ); # Truncate tail_tbl. pg_rewind should copy back the truncated part diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index 2433a4aab6..8f4f97232b 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -75,7 +75,8 @@ sub run_test "$test_master_datadir/tst_standby_dir/standby_file1", "$test_master_datadir/tst_standby_dir/standby_file2", "$test_master_datadir/tst_standby_dir/standby_subdir", -"$test_master_datadir/tst_standby_dir/standby_subdir/standby_file3" ], + "$test_master_datadir/tst_standby_dir/standby_subdir/standby_file3" + ], "file lists match"); RewindTest::clean_rewind_test(); diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index b346d245ac..e4404daa16 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -89,7 +89,7 @@ pgbench( # Again, with all possible options pgbench( -'--initialize --init-steps=dtpvg --scale=1 --unlogged-tables --fillfactor=98 --foreign-keys --quiet --tablespace=pg_default --index-tablespace=pg_default', + '--initialize --init-steps=dtpvg --scale=1 --unlogged-tables --fillfactor=98 --foreign-keys --quiet --tablespace=pg_default --index-tablespace=pg_default', 0, [qr{^$}i], [ qr{dropping old tables}, @@ -102,7 +102,7 @@ pgbench( # Test interaction of --init-steps with legacy step-selection options pgbench( -'--initialize --init-steps=dtpvgvv --no-vacuum --foreign-keys --unlogged-tables', + '--initialize --init-steps=dtpvgvv --no-vacuum --foreign-keys --unlogged-tables', 0, [qr{^$}], [ qr{dropping old tables}, @@ -126,7 +126,7 @@ pgbench( 'pgbench tpcb-like'); pgbench( -'--transactions=20 --client=5 -M extended --builtin=si -C --no-vacuum -s 1', + '--transactions=20 --client=5 -M extended --builtin=si -C --no-vacuum -s 1', 0, [ qr{builtin: simple update}, qr{clients: 5\b}, @@ -221,7 +221,7 @@ COMMIT; # test expressions # command 1..3 and 23 depend on random seed which is used to call srandom. pgbench( -'--random-seed=5432 -t 1 -Dfoo=-10.1 -Dbla=false -Di=+3 -Dminint=-9223372036854775808 -Dn=null -Dt=t -Df=of -Dd=1.0', + '--random-seed=5432 -t 1 -Dfoo=-10.1 -Dbla=false -Di=+3 -Dminint=-9223372036854775808 -Dn=null -Dt=t -Df=of -Dd=1.0', 0, [ qr{type: .*/001_pgbench_expressions}, qr{processed: 1/1} ], [ qr{setting random seed to 5432\b}, @@ -415,7 +415,7 @@ SELECT :v0, :v1, :v2, :v3; # random determinism when seeded $node->safe_psql('postgres', -'CREATE UNLOGGED TABLE seeded_random(seed INT8 NOT NULL, rand TEXT NOT NULL, val INTEGER NOT NULL);' + 'CREATE UNLOGGED TABLE seeded_random(seed INT8 NOT NULL, rand TEXT NOT NULL, val INTEGER NOT NULL);' ); # same value to check for determinism @@ -443,7 +443,7 @@ INSERT INTO seeded_random(seed, rand, val) VALUES # check that all runs generated the same 4 values my ($ret, $out, $err) = $node->psql('postgres', -'SELECT seed, rand, val, COUNT(*) FROM seeded_random GROUP BY seed, rand, val' + 'SELECT seed, rand, val, COUNT(*) FROM seeded_random GROUP BY seed, rand, val' ); ok($ret == 0, "psql seeded_random count ok"); @@ -627,7 +627,7 @@ for my $e (@errors) my $n = '001_pgbench_error_' . $name; $n =~ s/ /_/g; pgbench( -'-n -t 1 -Dfoo=bla -Dnull=null -Dtrue=true -Done=1 -Dzero=0.0 -Dbadtrue=trueXXX -M prepared', + '-n -t 1 -Dfoo=bla -Dnull=null -Dtrue=true -Done=1 -Dzero=0.0 -Dbadtrue=trueXXX -M prepared', $status, [ $status ? qr{^$} : qr{processed: 0/1} ], $re, @@ -710,7 +710,7 @@ my $bdir = $node->basedir; # with sampling rate pgbench( -"-n -S -t 50 -c 2 --log --log-prefix=$bdir/001_pgbench_log_2 --sampling-rate=0.5", + "-n -S -t 50 -c 2 --log --log-prefix=$bdir/001_pgbench_log_2 --sampling-rate=0.5", 0, [ qr{select only}, qr{processed: 100/100} ], [qr{^$}], diff --git a/src/bin/pgbench/t/002_pgbench_no_server.pl b/src/bin/pgbench/t/002_pgbench_no_server.pl index 24714960ba..7dcc812376 100644 --- a/src/bin/pgbench/t/002_pgbench_no_server.pl +++ b/src/bin/pgbench/t/002_pgbench_no_server.pl @@ -114,8 +114,7 @@ my @options = ( [ qr{unrecognized initialization step}, qr{allowed steps are} ] ], [ 'bad random seed', '--random-seed=one', - [ -qr{unrecognized random seed option "one": expecting an unsigned integer, "time" or "rand"}, + [ qr{unrecognized random seed option "one": expecting an unsigned integer, "time" or "rand"}, qr{error while setting random seed from --random-seed option} ] ], # loging sub-options diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl index a767338f92..ba093fa3a7 100644 --- a/src/bin/scripts/t/010_clusterdb.pl +++ b/src/bin/scripts/t/010_clusterdb.pl @@ -22,7 +22,7 @@ $node->command_fails([ 'clusterdb', '-t', 'nonexistent' ], 'fails with nonexistent table'); $node->safe_psql('postgres', -'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x' + 'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x' ); $node->issues_sql_like( [ 'clusterdb', '-t', 'test1' ], diff --git a/src/bin/scripts/t/040_createuser.pl b/src/bin/scripts/t/040_createuser.pl index f4fc7ea3a4..916d925947 100644 --- a/src/bin/scripts/t/040_createuser.pl +++ b/src/bin/scripts/t/040_createuser.pl @@ -15,19 +15,19 @@ $node->start; $node->issues_sql_like( [ 'createuser', 'regress_user1' ], -qr/statement: CREATE ROLE regress_user1 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;/, + qr/statement: CREATE ROLE regress_user1 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;/, 'SQL CREATE USER run'); $node->issues_sql_like( [ 'createuser', '-L', 'regress_role1' ], -qr/statement: CREATE ROLE regress_role1 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT NOLOGIN;/, + qr/statement: CREATE ROLE regress_role1 NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT NOLOGIN;/, 'create a non-login role'); $node->issues_sql_like( [ 'createuser', '-r', 'regress_user2' ], -qr/statement: CREATE ROLE regress_user2 NOSUPERUSER NOCREATEDB CREATEROLE INHERIT LOGIN;/, + qr/statement: CREATE ROLE regress_user2 NOSUPERUSER NOCREATEDB CREATEROLE INHERIT LOGIN;/, 'create a CREATEROLE user'); $node->issues_sql_like( [ 'createuser', '-s', 'regress_user3' ], -qr/statement: CREATE ROLE regress_user3 SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;/, + qr/statement: CREATE ROLE regress_user3 SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;/, 'create a superuser'); $node->command_fails([ 'createuser', 'regress_user1' ], diff --git a/src/bin/scripts/t/102_vacuumdb_stages.pl b/src/bin/scripts/t/102_vacuumdb_stages.pl index 1300aa7905..392944143b 100644 --- a/src/bin/scripts/t/102_vacuumdb_stages.pl +++ b/src/bin/scripts/t/102_vacuumdb_stages.pl @@ -10,7 +10,7 @@ $node->start; $node->issues_sql_like( [ 'vacuumdb', '--analyze-in-stages', 'postgres' ], -qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; + qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; .*statement:\ ANALYZE.* .*statement:\ SET\ default_statistics_target=10;\ RESET\ vacuum_cost_delay; .*statement:\ ANALYZE.* @@ -20,7 +20,7 @@ qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; $node->issues_sql_like( [ 'vacuumdb', '--analyze-in-stages', '--all' ], -qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; + qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; .*statement:\ ANALYZE.* .*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0; .*statement:\ ANALYZE.* |