From 50cc124532b7242b58869d4e07b151171c8bb072 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 26 Apr 2018 11:52:52 -0400 Subject: [PATCH 2/2] perltidy: Add option --nooutdent-long-quotes --- contrib/bloom/t/001_wal.pl | 6 +- src/backend/parser/check_keywords.pl | 6 +- .../storage/lmgr/generate-lwlocknames.pl | 2 +- src/backend/utils/Gen_dummy_probes.pl | 10 +-- src/backend/utils/Gen_fmgrtab.pl | 8 +- src/backend/utils/mb/Unicode/convutils.pm | 8 +- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 10 ++- .../pg_controldata/t/001_pg_controldata.pl | 3 +- src/bin/pg_dump/t/001_basic.pl | 35 ++++---- src/bin/pg_dump/t/002_pg_dump.pl | 84 +++++++++---------- src/bin/pg_resetwal/t/002_corrupted.pl | 6 +- src/bin/pg_rewind/t/001_basic.pl | 4 +- src/bin/pg_rewind/t/003_extrafiles.pl | 3 +- src/bin/pgbench/t/001_pgbench_with_server.pl | 16 ++-- src/bin/pgbench/t/002_pgbench_no_server.pl | 3 +- src/bin/scripts/t/010_clusterdb.pl | 2 +- src/bin/scripts/t/040_createuser.pl | 8 +- src/bin/scripts/t/102_vacuumdb_stages.pl | 4 +- src/interfaces/ecpg/preproc/check_rules.pl | 2 +- src/interfaces/ecpg/preproc/parse.pl | 4 +- src/test/authentication/t/001_password.pl | 5 +- src/test/ldap/t/001_auth.pl | 20 ++--- src/test/modules/brin/t/01_workitems.pl | 6 +- src/test/modules/commit_ts/t/001_base.pl | 6 +- src/test/modules/commit_ts/t/002_standby.pl | 6 +- src/test/modules/commit_ts/t/003_standby_2.pl | 4 +- src/test/modules/test_pg_dump/t/001_base.pl | 8 +- src/test/perl/PostgresNode.pm | 16 ++-- src/test/recovery/t/001_stream_rep.pl | 4 +- src/test/recovery/t/006_logical_decoding.pl | 21 ++--- src/test/recovery/t/007_sync_rep.pl | 2 +- .../t/010_logical_decoding_timelines.pl | 13 +-- src/test/recovery/t/012_subtransactions.pl | 4 +- src/test/recovery/t/013_crash_restart.pl | 11 +-- src/test/ssl/ServerSetup.pm | 14 ++-- src/test/ssl/t/001_ssltests.pl | 47 ++++++----- src/test/ssl/t/002_scram.pl | 2 +- src/test/subscription/t/001_rep_changes.pl | 20 ++--- src/test/subscription/t/002_types.pl | 4 +- src/test/subscription/t/003_constraints.pl | 6 +- src/test/subscription/t/004_sync.pl | 12 +-- src/test/subscription/t/005_encoding.pl | 4 +- src/test/subscription/t/006_rewrite.pl | 4 +- src/test/subscription/t/007_ddl.pl | 2 +- src/test/subscription/t/008_diff_schema.pl | 8 +- src/test/subscription/t/009_matviews.pl | 2 +- src/test/subscription/t/010_truncate.pl | 8 +- src/tools/check_bison_recursion.pl | 2 +- src/tools/fix-old-flex-code.pl | 2 +- src/tools/git_changelog | 2 +- src/tools/msvc/Install.pm | 12 +-- src/tools/msvc/MSBuildProject.pm | 4 +- src/tools/msvc/Mkvcbuild.pm | 2 +- src/tools/msvc/Solution.pm | 16 ++-- src/tools/msvc/VCBuildProject.pm | 14 ++-- src/tools/msvc/VSObjectFactory.pm | 8 +- src/tools/msvc/build.pl | 5 +- src/tools/msvc/builddoc.pl | 2 +- src/tools/msvc/vcregress.pl | 2 +- src/tools/pginclude/pgcheckdefines | 2 +- src/tools/pgindent/perltidyrc | 1 + src/tools/pgindent/pgindent | 6 +- src/tools/version_stamp.pl | 14 ++-- src/tools/win32tzlist.pl | 4 +- 64 files changed, 294 insertions(+), 287 deletions(-) diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl index 1b319c993c..55f2167d7f 100644 --- a/contrib/bloom/t/001_wal.pl +++ b/contrib/bloom/t/001_wal.pl @@ -16,7 +16,7 @@ sub test_index_replay # Wait for standby to catch up my $applname = $node_standby->name; my $caughtup_query = -"SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';"; + "SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';"; $node_master->poll_query_until('postgres', $caughtup_query) or die "Timed out while waiting for standby 1 to catch up"; @@ -57,7 +57,7 @@ sub test_index_replay $node_master->safe_psql("postgres", "CREATE EXTENSION bloom;"); $node_master->safe_psql("postgres", "CREATE TABLE tst (i int4, t text);"); $node_master->safe_psql("postgres", -"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;" + "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series(1,100000) i;" ); $node_master->safe_psql("postgres", "CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (col1 = 3);"); @@ -74,7 +74,7 @@ sub test_index_replay test_index_replay("vacuum $i"); my ($start, $end) = (100001 + ($i - 1) * 10000, 100000 + $i * 10000); $node_master->safe_psql("postgres", -"INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;" + "INSERT INTO tst SELECT i%10, substr(md5(i::text), 1, 1) FROM generate_series($start,$end) i;" ); test_index_replay("insert $i"); } diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl index d8ebddec9f..ad41e134ac 100644 --- a/src/backend/parser/check_keywords.pl +++ b/src/backend/parser/check_keywords.pl @@ -177,14 +177,14 @@ sub error if ($kwstring !~ /^[a-z_]+$/) { error -"'$kwstring' is not a valid keyword string, must be all lower-case ASCII chars"; + "'$kwstring' is not a valid keyword string, must be all lower-case ASCII chars"; } # Check that the keyword name is valid: all upper-case ASCII chars if ($kwname !~ /^[A-Z_]+$/) { error -"'$kwname' is not a valid keyword name, must be all upper-case ASCII chars"; + "'$kwname' is not a valid keyword name, must be all upper-case ASCII chars"; } # Check that the keyword string matches keyword name @@ -193,7 +193,7 @@ sub error if ($bare_kwname ne uc($kwstring)) { error -"keyword name '$kwname' doesn't match keyword string '$kwstring'"; + "keyword name '$kwname' doesn't match keyword string '$kwstring'"; } # Check that the keyword is present in the grammar diff --git a/src/backend/storage/lmgr/generate-lwlocknames.pl b/src/backend/storage/lmgr/generate-lwlocknames.pl index 6cf71c10c4..3913b3dc01 100644 --- a/src/backend/storage/lmgr/generate-lwlocknames.pl +++ b/src/backend/storage/lmgr/generate-lwlocknames.pl @@ -18,7 +18,7 @@ open my $c, '>', $ctmp or die "Could not open $ctmp: $!"; my $autogen = -"/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n"; + "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n"; print $h $autogen; print $h "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n"; print $c $autogen, "\n"; diff --git a/src/backend/utils/Gen_dummy_probes.pl b/src/backend/utils/Gen_dummy_probes.pl index 0458c43cc3..395f17881b 100644 --- a/src/backend/utils/Gen_dummy_probes.pl +++ b/src/backend/utils/Gen_dummy_probes.pl @@ -100,35 +100,35 @@ () # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/ { $s = -s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4)/s; + s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4)/s; $CondReg ||= $s; } # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/ { $s = -s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5)/s; + s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5)/s; $CondReg ||= $s; } # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/ { $s = -s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6)/s; + s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6)/s; $CondReg ||= $s; } # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/ { $s = -s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/s; + s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/s; $CondReg ||= $s; } # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/ { $s = -s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/s; + s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/s; $CondReg ||= $s; } diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl index 3ba1611f18..2aca8ac909 100644 --- a/src/backend/utils/Gen_fmgrtab.pl +++ b/src/backend/utils/Gen_fmgrtab.pl @@ -120,7 +120,7 @@ or die "Could not open $tabfile$tmpext: $!"; print $ofh -qq|/*------------------------------------------------------------------------- + qq|/*------------------------------------------------------------------------- * * fmgroids.h * Macros that define the OIDs of built-in functions. @@ -157,7 +157,7 @@ |; print $pfh -qq|/*------------------------------------------------------------------------- + qq|/*------------------------------------------------------------------------- * * fmgrprotos.h * Prototypes for built-in functions. @@ -183,7 +183,7 @@ |; print $tfh -qq|/*------------------------------------------------------------------------- + qq|/*------------------------------------------------------------------------- * * fmgrtab.c * The function manager's table of internal functions. @@ -230,7 +230,7 @@ foreach my $s (sort { $a->{oid} <=> $b->{oid} } @fmgr) { print $tfh -" { $s->{oid}, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} }"; + " { $s->{oid}, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} }"; $fmgr_builtin_oid_index[ $s->{oid} ] = $fmgr_count++; diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm index 69494d0df3..64abcfd2cb 100644 --- a/src/backend/utils/mb/Unicode/convutils.pm +++ b/src/backend/utils/mb/Unicode/convutils.pm @@ -168,7 +168,7 @@ sub print_from_utf8_combined_map printf $out "\n/* Combined character map */\n"; printf $out -"static const pg_utf_to_local_combined ULmap${charset}_combined[ %d ] = {", + "static const pg_utf_to_local_combined ULmap${charset}_combined[ %d ] = {", scalar(@$table); my $first = 1; foreach my $i (sort { $a->{utf8} <=> $b->{utf8} } @$table) @@ -202,7 +202,7 @@ sub print_to_utf8_combined_map printf $out "\n/* Combined character map */\n"; printf $out -"static const pg_local_to_utf_combined LUmap${charset}_combined[ %d ] = {", + "static const pg_local_to_utf_combined LUmap${charset}_combined[ %d ] = {", scalar(@$table); my $first = 1; @@ -613,7 +613,7 @@ sub print_radix_table if ($seg->{overlaid_trail_zeros}) { printf $out -" /* $seg->{overlaid_trail_zeros} trailing zero values shared with next segment */\n"; + " /* $seg->{overlaid_trail_zeros} trailing zero values shared with next segment */\n"; } } @@ -728,7 +728,7 @@ sub make_charmap if (defined $charmap{$src}) { printf STDERR -"Error: duplicate source code on %s:%d: 0x%04x => 0x%04x, 0x%04x\n", + "Error: duplicate source code on %s:%d: 0x%04x => 0x%04x, 0x%04x\n", $c->{f}, $c->{l}, $src, $charmap{$src}, $dst; exit; } 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 @@ 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 @@ # 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 @@ 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( [ '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( [ '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 @@ # 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 @@ '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 @@ '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 @@ '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 @@ '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 @@ 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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ 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 @@ 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 @@ '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 @@ '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 @@ 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 @@ 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 @@ 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 @@ 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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ '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 @@ 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 @@ '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 @@ '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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ [ '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 @@ [ '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 @@ sub 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 @@ sub 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 @@ sub 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 @@ sub pgbench # 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 @@ sub pgbench # 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 @@ sub pgbench # 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 @@ sub pgbench 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 @@ sub check_pgbench_logs # 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 @@ sub pgbench_scripts [ 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 @@ '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->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->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 @@ $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.* diff --git a/src/interfaces/ecpg/preproc/check_rules.pl b/src/interfaces/ecpg/preproc/check_rules.pl index 4c2151c1b6..6c8b004854 100644 --- a/src/interfaces/ecpg/preproc/check_rules.pl +++ b/src/interfaces/ecpg/preproc/check_rules.pl @@ -39,7 +39,7 @@ 'ExecuteStmtEXECUTEnameexecute_param_clause' => 'EXECUTE prepared_name execute_param_clause execute_rest', -'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause' + 'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause' => 'CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause', 'PrepareStmtPREPAREnameprep_type_clauseASPreparableStmt' => diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl index e68cc26f52..5db965f05e 100644 --- a/src/interfaces/ecpg/preproc/parse.pl +++ b/src/interfaces/ecpg/preproc/parse.pl @@ -101,7 +101,7 @@ 'RETURNING target_list opt_ecpg_into', 'ExecuteStmtEXECUTEnameexecute_param_clause' => 'EXECUTE prepared_name execute_param_clause execute_rest', -'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause' + 'ExecuteStmtCREATEOptTempTABLEcreate_as_targetASEXECUTEnameexecute_param_clause' => 'CREATE OptTemp TABLE create_as_target AS EXECUTE prepared_name execute_param_clause', 'PrepareStmtPREPAREnameprep_type_clauseASPreparableStmt' => 'PREPARE prepared_name prep_type_clause AS PreparableStmt', @@ -501,7 +501,7 @@ sub dump_fields if ($flds->[0] ne 'create' || $flds->[2] ne 'table') { add_to_buffer('rules', -'mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");' + 'mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");' ); } $feature_not_supported = 0; diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 9340f2f1ab..c8dc6606be 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -57,10 +57,11 @@ sub test_role # Create 3 roles with different password methods for each one. The same # password is used for all of them. $node->safe_psql('postgres', -"SET password_encryption='scram-sha-256'; CREATE ROLE scram_role LOGIN PASSWORD 'pass';" + "SET password_encryption='scram-sha-256'; CREATE ROLE scram_role LOGIN PASSWORD 'pass';" ); $node->safe_psql('postgres', -"SET password_encryption='md5'; CREATE ROLE md5_role LOGIN PASSWORD 'pass';"); + "SET password_encryption='md5'; CREATE ROLE md5_role LOGIN PASSWORD 'pass';" +); $ENV{"PGPASSWORD"} = 'pass'; # For "trust" method, all users should be able to connect. diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 10680b7837..9ade9a2b00 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -150,7 +150,7 @@ sub test_access unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapprefix="uid=" ldapsuffix=",dc=example,dc=net"} + qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapprefix="uid=" ldapsuffix=",dc=example,dc=net"} ); $node->restart; @@ -166,7 +166,7 @@ sub test_access unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn"} + qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn"} ); $node->restart; @@ -199,7 +199,7 @@ sub test_access unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(|(uid=\$username)(mail=\$username))"} + qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(|(uid=\$username)(mail=\$username))"} ); $node->restart; @@ -212,7 +212,7 @@ sub test_access unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapurl="$ldap_url/$ldap_basedn??sub?(|(uid=\$username)(mail=\$username))"} + qq{local all all ldap ldapurl="$ldap_url/$ldap_basedn??sub?(|(uid=\$username)(mail=\$username))"} ); $node->restart; @@ -226,7 +226,7 @@ sub test_access # override. It might be useful in a case like this. unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapurl="$ldap_url/$ldap_basedn??sub" ldapsearchfilter="(|(uid=\$username)(mail=\$username))"} + qq{local all all ldap ldapurl="$ldap_url/$ldap_basedn??sub" ldapsearchfilter="(|(uid=\$username)(mail=\$username))"} ); $node->restart; @@ -238,7 +238,7 @@ sub test_access # note bad ldapprefix with a question mark that triggers a diagnostic message unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapprefix="?uid=" ldapsuffix=""} + qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapprefix="?uid=" ldapsuffix=""} ); $node->restart; @@ -250,7 +250,7 @@ sub test_access # request StartTLS with ldaptls=1 unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(uid=\$username)" ldaptls=1} + qq{local all all ldap ldapserver=$ldap_server ldapport=$ldap_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(uid=\$username)" ldaptls=1} ); $node->restart; @@ -260,7 +260,7 @@ sub test_access # request LDAPS with ldapscheme=ldaps unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapserver=$ldap_server ldapscheme=ldaps ldapport=$ldaps_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(uid=\$username)"} + qq{local all all ldap ldapserver=$ldap_server ldapscheme=ldaps ldapport=$ldaps_port ldapbasedn="$ldap_basedn" ldapsearchfilter="(uid=\$username)"} ); $node->restart; @@ -270,7 +270,7 @@ sub test_access # request LDAPS with ldapurl=ldaps://... unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapurl="$ldaps_url/$ldap_basedn??sub?(uid=\$username)"} + qq{local all all ldap ldapurl="$ldaps_url/$ldap_basedn??sub?(uid=\$username)"} ); $node->restart; @@ -280,7 +280,7 @@ sub test_access # bad combination of LDAPS and StartTLS unlink($node->data_dir . '/pg_hba.conf'); $node->append_conf('pg_hba.conf', -qq{local all all ldap ldapurl="$ldaps_url/$ldap_basedn??sub?(uid=\$username)" ldaptls=1} + qq{local all all ldap ldapurl="$ldaps_url/$ldap_basedn??sub?(uid=\$username)" ldaptls=1} ); $node->restart; diff --git a/src/test/modules/brin/t/01_workitems.pl b/src/test/modules/brin/t/01_workitems.pl index c889a8313f..534ab63ab2 100644 --- a/src/test/modules/brin/t/01_workitems.pl +++ b/src/test/modules/brin/t/01_workitems.pl @@ -22,7 +22,7 @@ ' ); my $count = $node->safe_psql('postgres', -"select count(*) from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)" + "select count(*) from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)" ); is($count, '1', "initial index state is correct"); @@ -31,11 +31,11 @@ $node->poll_query_until( 'postgres', -"select count(*) > 1 from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)", + "select count(*) > 1 from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)", 't'); $count = $node->safe_psql('postgres', -"select count(*) > 1 from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)" + "select count(*) > 1 from brin_page_items(get_raw_page('brin_wi_idx', 2), 'brin_wi_idx'::regclass)" ); is($count, 't', "index got summarized"); $node->stop; diff --git a/src/test/modules/commit_ts/t/001_base.pl b/src/test/modules/commit_ts/t/001_base.pl index 9290a85d89..f8d5d84cc5 100644 --- a/src/test/modules/commit_ts/t/001_base.pl +++ b/src/test/modules/commit_ts/t/001_base.pl @@ -16,11 +16,11 @@ $node->safe_psql('postgres', 'create table t as select now from (select now(), pg_sleep(1)) f'); my $true = $node->safe_psql('postgres', -'select t.now - ts.* < \'1s\' from t, pg_class c, pg_xact_commit_timestamp(c.xmin) ts where relname = \'t\'' + 'select t.now - ts.* < \'1s\' from t, pg_class c, pg_xact_commit_timestamp(c.xmin) ts where relname = \'t\'' ); is($true, 't', 'commit TS is set'); my $ts = $node->safe_psql('postgres', -'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'' + 'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'' ); # Verify that we read the same TS after crash recovery @@ -28,6 +28,6 @@ $node->start; my $recovered_ts = $node->safe_psql('postgres', -'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'' + 'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\'' ); is($recovered_ts, $ts, 'commit TS remains after crash recovery'); diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl index 83e851954b..f376b59596 100644 --- a/src/test/modules/commit_ts/t/002_standby.pl +++ b/src/test/modules/commit_ts/t/002_standby.pl @@ -28,7 +28,7 @@ $master->safe_psql('postgres', "create table t$i()"); } my $master_ts = $master->safe_psql('postgres', -qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'} + qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'} ); my $master_lsn = $master->safe_psql('postgres', 'select pg_current_wal_lsn()'); @@ -37,7 +37,7 @@ or die "standby never caught up"; my $standby_ts = $standby->safe_psql('postgres', -qq{select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = 't10'} + qq{select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = 't10'} ); is($master_ts, $standby_ts, "standby gives same value as master"); @@ -52,7 +52,7 @@ # This one should raise an error now my ($ret, $standby_ts_stdout, $standby_ts_stderr) = $standby->psql('postgres', -'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t10\'' + 'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t10\'' ); is($ret, 3, 'standby errors when master turned feature off'); is($standby_ts_stdout, '', diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl index 27494709e1..9165d50053 100644 --- a/src/test/modules/commit_ts/t/003_standby_2.pl +++ b/src/test/modules/commit_ts/t/003_standby_2.pl @@ -40,7 +40,7 @@ my ($psql_ret, $standby_ts_stdout, $standby_ts_stderr) = $standby->psql( 'postgres', -qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'} + qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'} ); is($psql_ret, 3, 'expect error when getting commit timestamp after restart'); is($standby_ts_stdout, '', "standby does not return a value after restart"); @@ -58,7 +58,7 @@ $standby->safe_psql('postgres', "create table t11()"); my $standby_ts = $standby->safe_psql('postgres', -qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't11'} + qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't11'} ); isnt($standby_ts, '', "standby gives valid value ($standby_ts) after promotion"); diff --git a/src/test/modules/test_pg_dump/t/001_base.pl b/src/test/modules/test_pg_dump/t/001_base.pl index 3d61dacce3..e49dffd468 100644 --- a/src/test/modules/test_pg_dump/t/001_base.pl +++ b/src/test/modules/test_pg_dump/t/001_base.pl @@ -190,7 +190,7 @@ 'ALTER EXTENSION test_pg_dump' => { create_order => 9, create_sql => -'ALTER EXTENSION test_pg_dump ADD TABLE regress_pg_dump_table_added;', + 'ALTER EXTENSION test_pg_dump ADD TABLE regress_pg_dump_table_added;', regexp => qr/^ \QCREATE TABLE public.regress_pg_dump_table_added (\E \n\s+\Qcol1 integer NOT NULL,\E @@ -231,7 +231,7 @@ 'CREATE TABLE regress_pg_dump_table_added' => { create_order => 7, create_sql => -'CREATE TABLE regress_pg_dump_table_added (col1 int not null, col2 int);', + 'CREATE TABLE regress_pg_dump_table_added (col1 int not null, col2 int);', regexp => qr/^ \QCREATE TABLE public.regress_pg_dump_table_added (\E \n\s+\Qcol1 integer NOT NULL,\E @@ -288,7 +288,7 @@ 'GRANT SELECT regress_pg_dump_table_added pre-ALTER EXTENSION' => { create_order => 8, create_sql => -'GRANT SELECT ON regress_pg_dump_table_added TO regress_dump_test_role;', + 'GRANT SELECT ON regress_pg_dump_table_added TO regress_dump_test_role;', regexp => qr/^ \QGRANT SELECT ON TABLE public.regress_pg_dump_table_added TO regress_dump_test_role;\E \n/xm, @@ -297,7 +297,7 @@ 'REVOKE SELECT regress_pg_dump_table_added post-ALTER EXTENSION' => { create_order => 10, create_sql => -'REVOKE SELECT ON regress_pg_dump_table_added FROM regress_dump_test_role;', + 'REVOKE SELECT ON regress_pg_dump_table_added FROM regress_dump_test_role;', regexp => qr/^ \QREVOKE SELECT ON TABLE public.regress_pg_dump_table_added FROM regress_dump_test_role;\E \n/xm, diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index aa81e0c20c..976e95f448 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -389,7 +389,7 @@ sub set_replication_conf if ($TestLib::windows_os) { print $hba -"host replication all $test_localhost/32 sspi include_realm=1 map=regress\n"; + "host replication all $test_localhost/32 sspi include_realm=1 map=regress\n"; } close $hba; } @@ -652,7 +652,7 @@ sub init_from_backup $params{has_restoring} = 0 unless defined $params{has_restoring}; print -"# Initializing node \"$node_name\" from backup \"$backup_name\" of node \"$root_name\"\n"; + "# Initializing node \"$node_name\" from backup \"$backup_name\" of node \"$root_name\"\n"; croak "Backup \"$backup_name\" does not exist at $backup_path" unless -d $backup_path; @@ -1272,7 +1272,7 @@ sub psql die "connection error: '$$stderr'\nwhile running '@psql_params'" if $ret == 2; die -"error running SQL: '$$stderr'\nwhile running '@psql_params' with sql '$sql'" + "error running SQL: '$$stderr'\nwhile running '@psql_params' with sql '$sql'" if $ret == 3; die "psql returns $ret: '$$stderr'\nwhile running '@psql_params'"; } @@ -1544,7 +1544,7 @@ sub wait_for_catchup . $lsn_expr . " on " . $self->name . "\n"; my $query = -qq[SELECT $lsn_expr <= ${mode}_lsn FROM pg_catalog.pg_stat_replication WHERE application_name = '$standby_name';]; + qq[SELECT $lsn_expr <= ${mode}_lsn FROM pg_catalog.pg_stat_replication WHERE application_name = '$standby_name';]; $self->poll_query_until('postgres', $query) or croak "timed out waiting for catchup"; print "done\n"; @@ -1586,7 +1586,7 @@ sub wait_for_slot_catchup . $target_lsn . " on " . $self->name . "\n"; my $query = -qq[SELECT '$target_lsn' <= ${mode}_lsn FROM pg_catalog.pg_replication_slots WHERE slot_name = '$slot_name';]; + qq[SELECT '$target_lsn' <= ${mode}_lsn FROM pg_catalog.pg_replication_slots WHERE slot_name = '$slot_name';]; $self->poll_query_until('postgres', $query) or croak "timed out waiting for catchup"; print "done\n"; @@ -1661,7 +1661,7 @@ sub slot 'restart_lsn'); return $self->query_hash( 'postgres', -"SELECT __COLUMNS__ FROM pg_catalog.pg_replication_slots WHERE slot_name = '$slot_name'", + "SELECT __COLUMNS__ FROM pg_catalog.pg_replication_slots WHERE slot_name = '$slot_name'", @columns); } @@ -1736,7 +1736,7 @@ sub pg_recvlogical_upto unless $timeout->is_expired; die -"$exc_save waiting for endpos $endpos with stdout '$stdout', stderr '$stderr'" + "$exc_save waiting for endpos $endpos with stdout '$stdout', stderr '$stderr'" unless wantarray; } }; @@ -1751,7 +1751,7 @@ sub pg_recvlogical_upto else { die -"pg_recvlogical exited with code '$ret', stdout '$stdout' and stderr '$stderr'" + "pg_recvlogical exited with code '$ret', stdout '$stdout' and stderr '$stderr'" if $ret; return $stdout; } diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl index fb27925069..a29a6c720b 100644 --- a/src/test/recovery/t/001_stream_rep.pl +++ b/src/test/recovery/t/001_stream_rep.pl @@ -95,7 +95,7 @@ sub test_target_session_attrs extra_params => [ '-d', $connstr ]); is( $status == $ret && $stdout eq $target_node->port, 1, -"connect to node $target_name if mode \"$mode\" and $node1_name,$node2_name listed" + "connect to node $target_name if mode \"$mode\" and $node1_name,$node2_name listed" ); } @@ -183,7 +183,7 @@ sub get_slot_xmins sub replay_check { my $newval = $node_master->safe_psql('postgres', -'INSERT INTO replayed(val) SELECT coalesce(max(val),0) + 1 AS newval FROM replayed RETURNING val' + 'INSERT INTO replayed(val) SELECT coalesce(max(val),0) + 1 AS newval FROM replayed RETURNING val' ); $node_master->wait_for_catchup($node_standby_1, 'replay', $node_master->lsn('insert')); diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl index 7e1759fbaf..588c71eda3 100644 --- a/src/test/recovery/t/006_logical_decoding.pl +++ b/src/test/recovery/t/006_logical_decoding.pl @@ -24,10 +24,11 @@ qq[CREATE TABLE decoding_test(x integer, y text);]); $node_master->safe_psql('postgres', -qq[SELECT pg_create_logical_replication_slot('test_slot', 'test_decoding');]); + qq[SELECT pg_create_logical_replication_slot('test_slot', 'test_decoding');] +); $node_master->safe_psql('postgres', -qq[INSERT INTO decoding_test(x,y) SELECT s, s::text FROM generate_series(1,10) s;] + qq[INSERT INTO decoding_test(x,y) SELECT s, s::text FROM generate_series(1,10) s;] ); # Basic decoding works @@ -50,7 +51,7 @@ # Insert some rows and verify that we get the same results from pg_recvlogical # and the SQL interface. $node_master->safe_psql('postgres', -qq[INSERT INTO decoding_test(x,y) SELECT s, s::text FROM generate_series(1,4) s;] + qq[INSERT INTO decoding_test(x,y) SELECT s, s::text FROM generate_series(1,4) s;] ); my $expected = q{BEGIN @@ -61,12 +62,12 @@ COMMIT}; my $stdout_sql = $node_master->safe_psql('postgres', -qq[SELECT data FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');] + qq[SELECT data FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');] ); is($stdout_sql, $expected, 'got expected output from SQL decoding session'); my $endpos = $node_master->safe_psql('postgres', -"SELECT lsn FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" + "SELECT lsn FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" ); print "waiting to replay $endpos\n"; @@ -79,7 +80,7 @@ 'got same expected output from pg_recvlogical decoding session'); $node_master->poll_query_until('postgres', -"SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'test_slot' AND active_pid IS NULL)" + "SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'test_slot' AND active_pid IS NULL)" ) or die "slot never became inactive"; $stdout_recv = $node_master->pg_recvlogical_upto( @@ -94,13 +95,13 @@ is( $node_master->psql( 'otherdb', -"SELECT lsn FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" + "SELECT lsn FROM pg_logical_slot_peek_changes('test_slot', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" ), 3, 'replaying logical slot from another database fails'); $node_master->safe_psql('otherdb', -qq[SELECT pg_create_logical_replication_slot('otherdb_slot', 'test_decoding');] + qq[SELECT pg_create_logical_replication_slot('otherdb_slot', 'test_decoding');] ); # make sure you can't drop a slot while active @@ -114,7 +115,7 @@ [ 'pg_recvlogical', '-d', $node_master->connstr('otherdb'), '-S', 'otherdb_slot', '-f', '-', '--start' ]); $node_master->poll_query_until('otherdb', -"SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'otherdb_slot' AND active_pid IS NOT NULL)" + "SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'otherdb_slot' AND active_pid IS NOT NULL)" ) or die "slot never became active"; is($node_master->psql('postgres', 'DROP DATABASE otherdb'), 3, 'dropping a DB with active logical slots fails'); @@ -124,7 +125,7 @@ } $node_master->poll_query_until('otherdb', -"SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'otherdb_slot' AND active_pid IS NULL)" + "SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'otherdb_slot' AND active_pid IS NULL)" ) or die "slot never became inactive"; is($node_master->psql('postgres', 'DROP DATABASE otherdb'), diff --git a/src/test/recovery/t/007_sync_rep.pl b/src/test/recovery/t/007_sync_rep.pl index e21d1a5274..0ddf70b8b8 100644 --- a/src/test/recovery/t/007_sync_rep.pl +++ b/src/test/recovery/t/007_sync_rep.pl @@ -7,7 +7,7 @@ # Query checking sync_priority and sync_state of each standby my $check_sql = -"SELECT application_name, sync_priority, sync_state FROM pg_stat_replication ORDER BY application_name;"; + "SELECT application_name, sync_priority, sync_state FROM pg_stat_replication ORDER BY application_name;"; # Check that sync_state of each standby is expected (waiting till it is). # If $setting is given, synchronous_standby_names is set to it and diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl index 5620450acf..a76eea86a5 100644 --- a/src/test/recovery/t/010_logical_decoding_timelines.pl +++ b/src/test/recovery/t/010_logical_decoding_timelines.pl @@ -48,7 +48,7 @@ note "testing logical timeline following with a filesystem-level copy"; $node_master->safe_psql('postgres', -"SELECT pg_create_logical_replication_slot('before_basebackup', 'test_decoding');" + "SELECT pg_create_logical_replication_slot('before_basebackup', 'test_decoding');" ); $node_master->safe_psql('postgres', "CREATE TABLE decoding(blah text);"); $node_master->safe_psql('postgres', @@ -60,7 +60,8 @@ # the same physical copy trick, so: $node_master->safe_psql('postgres', 'CREATE DATABASE dropme;'); $node_master->safe_psql('dropme', -"SELECT pg_create_logical_replication_slot('dropme_slot', 'test_decoding');"); + "SELECT pg_create_logical_replication_slot('dropme_slot', 'test_decoding');" +); $node_master->safe_psql('postgres', 'CHECKPOINT;'); @@ -95,7 +96,7 @@ # Back to testing failover... $node_master->safe_psql('postgres', -"SELECT pg_create_logical_replication_slot('after_basebackup', 'test_decoding');" + "SELECT pg_create_logical_replication_slot('after_basebackup', 'test_decoding');" ); $node_master->safe_psql('postgres', "INSERT INTO decoding(blah) VALUES ('afterbb');"); @@ -141,7 +142,7 @@ # Shouldn't be able to read from slot created after base backup ($ret, $stdout, $stderr) = $node_replica->psql('postgres', -"SELECT data FROM pg_logical_slot_peek_changes('after_basebackup', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');" + "SELECT data FROM pg_logical_slot_peek_changes('after_basebackup', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');" ); is($ret, 3, 'replaying from after_basebackup slot fails'); like( @@ -152,7 +153,7 @@ # Should be able to read from slot created before base backup ($ret, $stdout, $stderr) = $node_replica->psql( 'postgres', -"SELECT data FROM pg_logical_slot_peek_changes('before_basebackup', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');", + "SELECT data FROM pg_logical_slot_peek_changes('before_basebackup', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');", timeout => 30); is($ret, 0, 'replay from slot before_basebackup succeeds'); @@ -174,7 +175,7 @@ BEGIN # of the last transaction. There's no max(pg_lsn), so: my $endpos = $node_replica->safe_psql('postgres', -"SELECT lsn FROM pg_logical_slot_peek_changes('before_basebackup', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" + "SELECT lsn FROM pg_logical_slot_peek_changes('before_basebackup', NULL, NULL) ORDER BY lsn DESC LIMIT 1;" ); # now use the walsender protocol to peek the slot changes and make sure we see diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl index 216c3331d6..efc23d0559 100644 --- a/src/test/recovery/t/012_subtransactions.pl +++ b/src/test/recovery/t/012_subtransactions.pl @@ -177,7 +177,7 @@ $node_standby->start; $psql_rc = $node_master->psql('postgres', "COMMIT PREPARED 'xact_012_1'"); is($psql_rc, '0', -"Restore of PGPROC_MAX_CACHED_SUBXIDS+ prepared transaction on promoted standby" + "Restore of PGPROC_MAX_CACHED_SUBXIDS+ prepared transaction on promoted standby" ); $node_master->psql( @@ -218,7 +218,7 @@ $node_standby->start; $psql_rc = $node_master->psql('postgres', "ROLLBACK PREPARED 'xact_012_1'"); is($psql_rc, '0', -"Rollback of PGPROC_MAX_CACHED_SUBXIDS+ prepared transaction on promoted standby" + "Rollback of PGPROC_MAX_CACHED_SUBXIDS+ prepared transaction on promoted standby" ); $node_master->psql( diff --git a/src/test/recovery/t/013_crash_restart.pl b/src/test/recovery/t/013_crash_restart.pl index 783c936393..d8ef22f522 100644 --- a/src/test/recovery/t/013_crash_restart.pl +++ b/src/test/recovery/t/013_crash_restart.pl @@ -111,7 +111,7 @@ ok( pump_until( $killme, \$killme_stderr, -qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m + qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m ), "psql query died successfully after SIGQUIT"); $killme_stderr = ''; @@ -124,7 +124,7 @@ ok( pump_until( $monitor, \$monitor_stderr, -qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m + qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m ), "psql monitor died successfully after SIGQUIT"); $monitor->finish; @@ -204,7 +204,7 @@ ok( pump_until( $monitor, \$monitor_stderr, -qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m + qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly/m ), "psql monitor died successfully after SIGKILL"); $monitor->finish; @@ -220,7 +220,8 @@ is( $node->safe_psql( 'postgres', -'INSERT INTO alive VALUES($$before-orderly-restart$$) RETURNING status'), + 'INSERT INTO alive VALUES($$before-orderly-restart$$) RETURNING status' + ), 'before-orderly-restart', 'can still write after crash restart'); @@ -228,7 +229,7 @@ $node->restart(); is( $node->safe_psql('postgres', 'SELECT * FROM alive'), -"committed-before-sigquit\ncommitted-before-sigkill\nbefore-orderly-restart", + "committed-before-sigquit\ncommitted-before-sigkill\nbefore-orderly-restart", 'data survived'); is( $node->safe_psql( diff --git a/src/test/ssl/ServerSetup.pm b/src/test/ssl/ServerSetup.pm index 5a7ba953e2..e97d71e257 100644 --- a/src/test/ssl/ServerSetup.pm +++ b/src/test/ssl/ServerSetup.pm @@ -91,10 +91,10 @@ sub configure_test_server_for_ssl if (defined($password)) { $node->psql('postgres', -"SET password_encryption='$password_enc'; ALTER USER ssltestuser PASSWORD '$password';" + "SET password_encryption='$password_enc'; ALTER USER ssltestuser PASSWORD '$password';" ); $node->psql('postgres', -"SET password_encryption='$password_enc'; ALTER USER anotheruser PASSWORD '$password';" + "SET password_encryption='$password_enc'; ALTER USER anotheruser PASSWORD '$password';" ); } @@ -161,14 +161,14 @@ sub configure_hba_for_ssl # When connecting to certdb, also check the client certificate. open my $hba, '>', "$pgdata/pg_hba.conf"; print $hba -"# TYPE DATABASE USER ADDRESS METHOD\n"; + "# TYPE DATABASE USER ADDRESS METHOD\n"; print $hba -"hostssl trustdb all $serverhost/32 $authmethod\n"; + "hostssl trustdb all $serverhost/32 $authmethod\n"; print $hba -"hostssl trustdb all ::1/128 $authmethod\n"; + "hostssl trustdb all ::1/128 $authmethod\n"; print $hba -"hostssl certdb all $serverhost/32 cert\n"; + "hostssl certdb all $serverhost/32 cert\n"; print $hba -"hostssl certdb all ::1/128 cert\n"; + "hostssl certdb all ::1/128 cert\n"; close $hba; } diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 956de962ca..e550207454 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -88,7 +88,7 @@ switch_server_cert($node, 'server-cn-only'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid hostaddr=$SERVERHOSTADDR host=common-name.pg-ssltest.test"; + "user=ssltestuser dbname=trustdb sslcert=invalid hostaddr=$SERVERHOSTADDR host=common-name.pg-ssltest.test"; # The server should not accept non-SSL connections. test_connect_fails( @@ -167,20 +167,20 @@ # A CRL belonging to a different CA is not accepted, fails test_connect_fails( $common_connstr, -"sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/client.crl", + "sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/client.crl", qr/SSL error/, "CRL belonging to a different CA"); # With the correct CRL, succeeds (this cert is not revoked) test_connect_ok( $common_connstr, -"sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/root+server.crl", + "sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/root+server.crl", "CRL with a non-revoked cert"); # Check that connecting with verify-full fails, when the hostname doesn't # match the hostname in the server's certificate. $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; + "user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; test_connect_ok( $common_connstr, @@ -193,14 +193,14 @@ test_connect_fails( $common_connstr, "sslmode=verify-full host=wronghost.test", -qr/\Qserver certificate for "common-name.pg-ssltest.test" does not match host name "wronghost.test"\E/, + qr/\Qserver certificate for "common-name.pg-ssltest.test" does not match host name "wronghost.test"\E/, "mismatch between host name and server certificate sslmode=verify-full"); # Test Subject Alternative Names. switch_server_cert($node, 'server-multiple-alt-names'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; + "user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; test_connect_ok( $common_connstr, @@ -218,12 +218,12 @@ test_connect_fails( $common_connstr, "host=wronghost.alt-name.pg-ssltest.test", -qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 2 other names) does not match host name "wronghost.alt-name.pg-ssltest.test"\E/, + qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 2 other names) does not match host name "wronghost.alt-name.pg-ssltest.test"\E/, "host name not matching with X.509 Subject Alternative Names"); test_connect_fails( $common_connstr, "host=deep.subdomain.wildcard.pg-ssltest.test", -qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 2 other names) does not match host name "deep.subdomain.wildcard.pg-ssltest.test"\E/, + qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 2 other names) does not match host name "deep.subdomain.wildcard.pg-ssltest.test"\E/, "host name not matching with X.509 Subject Alternative Names wildcard"); # Test certificate with a single Subject Alternative Name. (this gives a @@ -231,7 +231,7 @@ switch_server_cert($node, 'server-single-alt-name'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; + "user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; test_connect_ok( $common_connstr, @@ -241,13 +241,13 @@ test_connect_fails( $common_connstr, "host=wronghost.alt-name.pg-ssltest.test", -qr/\Qserver certificate for "single.alt-name.pg-ssltest.test" does not match host name "wronghost.alt-name.pg-ssltest.test"\E/, + qr/\Qserver certificate for "single.alt-name.pg-ssltest.test" does not match host name "wronghost.alt-name.pg-ssltest.test"\E/, "host name not matching with a single X.509 Subject Alternative Name"); test_connect_fails( $common_connstr, "host=deep.subdomain.wildcard.pg-ssltest.test", -qr/\Qserver certificate for "single.alt-name.pg-ssltest.test" does not match host name "deep.subdomain.wildcard.pg-ssltest.test"\E/, -"host name not matching with a single X.509 Subject Alternative Name wildcard" + qr/\Qserver certificate for "single.alt-name.pg-ssltest.test" does not match host name "deep.subdomain.wildcard.pg-ssltest.test"\E/, + "host name not matching with a single X.509 Subject Alternative Name wildcard" ); # Test server certificate with a CN and SANs. Per RFCs 2818 and 6125, the CN @@ -255,7 +255,7 @@ switch_server_cert($node, 'server-cn-and-alt-names'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; + "user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full"; test_connect_ok( $common_connstr, @@ -268,14 +268,14 @@ test_connect_fails( $common_connstr, "host=common-name.pg-ssltest.test", -qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 1 other name) does not match host name "common-name.pg-ssltest.test"\E/, + qr/\Qserver certificate for "dns1.alt-name.pg-ssltest.test" (and 1 other name) does not match host name "common-name.pg-ssltest.test"\E/, "certificate with both a CN and SANs ignores CN"); # Finally, test a server certificate that has no CN or SANs. Of course, that's # not a very sensible certificate, but libpq should handle it gracefully. switch_server_cert($node, 'server-no-names'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; + "user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; test_connect_ok( $common_connstr, @@ -291,7 +291,7 @@ switch_server_cert($node, 'server-revoked'); $common_connstr = -"user=ssltestuser dbname=trustdb sslcert=invalid hostaddr=$SERVERHOSTADDR host=common-name.pg-ssltest.test"; + "user=ssltestuser dbname=trustdb sslcert=invalid hostaddr=$SERVERHOSTADDR host=common-name.pg-ssltest.test"; # Without the CRL, succeeds. With it, fails. test_connect_ok( @@ -300,7 +300,7 @@ "connects without client-side CRL"); test_connect_fails( $common_connstr, -"sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/root+server.crl", + "sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca sslcrl=ssl/root+server.crl", qr/SSL error/, "does not connect with client-side CRL"); @@ -311,7 +311,7 @@ note "running server tests"; $common_connstr = -"sslrootcert=ssl/root+server_ca.crt sslmode=require dbname=certdb hostaddr=$SERVERHOSTADDR"; + "sslrootcert=ssl/root+server_ca.crt sslmode=require dbname=certdb hostaddr=$SERVERHOSTADDR"; # no client cert test_connect_fails( @@ -329,8 +329,8 @@ # client key with wrong permissions test_connect_fails( $common_connstr, -"user=ssltestuser sslcert=ssl/client.crt sslkey=ssl/client_wrongperms_tmp.key", -qr!\Qprivate key file "ssl/client_wrongperms_tmp.key" has group or world access\E!, + "user=ssltestuser sslcert=ssl/client.crt sslkey=ssl/client_wrongperms_tmp.key", + qr!\Qprivate key file "ssl/client_wrongperms_tmp.key" has group or world access\E!, "certificate authorization fails because of file permissions"); # client cert belonging to another user @@ -338,19 +338,20 @@ $common_connstr, "user=anotheruser sslcert=ssl/client.crt sslkey=ssl/client_tmp.key", qr/certificate authentication failed for user "anotheruser"/, -"certificate authorization fails with client cert belonging to another user"); + "certificate authorization fails with client cert belonging to another user" +); # revoked client cert test_connect_fails( $common_connstr, -"user=ssltestuser sslcert=ssl/client-revoked.crt sslkey=ssl/client-revoked_tmp.key", + "user=ssltestuser sslcert=ssl/client-revoked.crt sslkey=ssl/client-revoked_tmp.key", qr/SSL error/, "certificate authorization fails with revoked client cert"); # intermediate client_ca.crt is provided by client, and isn't in server's ssl_ca_file switch_server_cert($node, 'server-cn-only', 'root_ca'); $common_connstr = -"user=ssltestuser dbname=certdb sslkey=ssl/client_tmp.key sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; + "user=ssltestuser dbname=certdb sslkey=ssl/client_tmp.key sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR"; test_connect_ok( $common_connstr, diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index fa3f856646..52a8f458cb 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -68,7 +68,7 @@ test_connect_fails( $common_connstr, "scram_channel_binding=tls-server-end-point", -qr/channel binding type "tls-server-end-point" is not supported by this build/, + qr/channel binding type "tls-server-end-point" is not supported by this build/, "SCRAM authentication with tls-server-end-point as channel binding"); $number_of_tests++; } diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl index e16b710ef1..503556fd6c 100644 --- a/src/test/subscription/t/001_rep_changes.pl +++ b/src/test/subscription/t/001_rep_changes.pl @@ -32,7 +32,7 @@ $node_publisher->safe_psql('postgres', "INSERT INTO tab_mixed (a, b) VALUES (1, 'foo')"); $node_publisher->safe_psql('postgres', -"CREATE TABLE tab_include (a int, b text, CONSTRAINT covering PRIMARY KEY(a) INCLUDE(b))" + "CREATE TABLE tab_include (a int, b text, CONSTRAINT covering PRIMARY KEY(a) INCLUDE(b))" ); # Setup structure on subscriber @@ -49,7 +49,7 @@ # replication of the table with included index $node_subscriber->safe_psql('postgres', -"CREATE TABLE tab_include (a int, b text, CONSTRAINT covering PRIMARY KEY(a) INCLUDE(b))" + "CREATE TABLE tab_include (a int, b text, CONSTRAINT covering PRIMARY KEY(a) INCLUDE(b))" ); # Setup logical replication @@ -58,21 +58,21 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub_ins_only WITH (publish = insert)"); $node_publisher->safe_psql('postgres', -"ALTER PUBLICATION tap_pub ADD TABLE tab_rep, tab_full, tab_full2, tab_mixed, tab_include" + "ALTER PUBLICATION tap_pub ADD TABLE tab_rep, tab_full, tab_full2, tab_mixed, tab_include" ); $node_publisher->safe_psql('postgres', "ALTER PUBLICATION tap_pub_ins_only ADD TABLE tab_ins"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub, tap_pub_ins_only" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub, tap_pub_ins_only" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; @@ -168,20 +168,20 @@ "SELECT pid FROM pg_stat_replication WHERE application_name = '$appname';" ); $node_subscriber->safe_psql('postgres', -"ALTER SUBSCRIPTION tap_sub CONNECTION 'application_name=$appname $publisher_connstr'" + "ALTER SUBSCRIPTION tap_sub CONNECTION 'application_name=$appname $publisher_connstr'" ); $node_publisher->poll_query_until('postgres', -"SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" ) or die "Timed out while waiting for apply to restart"; $oldpid = $node_publisher->safe_psql('postgres', "SELECT pid FROM pg_stat_replication WHERE application_name = '$appname';" ); $node_subscriber->safe_psql('postgres', -"ALTER SUBSCRIPTION tap_sub SET PUBLICATION tap_pub_ins_only WITH (copy_data = false)" + "ALTER SUBSCRIPTION tap_sub SET PUBLICATION tap_pub_ins_only WITH (copy_data = false)" ); $node_publisher->poll_query_until('postgres', -"SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" ) or die "Timed out while waiting for apply to restart"; $node_publisher->safe_psql('postgres', @@ -230,7 +230,7 @@ $node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub RENAME TO tap_sub_renamed"); $node_publisher->poll_query_until('postgres', -"SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname';" ) or die "Timed out while waiting for apply to restart"; # check all the cleanup diff --git a/src/test/subscription/t/002_types.pl b/src/test/subscription/t/002_types.pl index 80620416fa..a49e56f630 100644 --- a/src/test/subscription/t/002_types.pl +++ b/src/test/subscription/t/002_types.pl @@ -103,14 +103,14 @@ my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (slot_name = tap_sub_slot)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (slot_name = tap_sub_slot)" ); $node_publisher->wait_for_catchup($appname); # Wait for initial sync to finish as well my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; diff --git a/src/test/subscription/t/003_constraints.pl b/src/test/subscription/t/003_constraints.pl index fe47447b98..a5b548ecee 100644 --- a/src/test/subscription/t/003_constraints.pl +++ b/src/test/subscription/t/003_constraints.pl @@ -19,14 +19,14 @@ $node_publisher->safe_psql('postgres', "CREATE TABLE tab_fk (bid int PRIMARY KEY);"); $node_publisher->safe_psql('postgres', -"CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" + "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" ); # Setup structure on subscriber $node_subscriber->safe_psql('postgres', "CREATE TABLE tab_fk (bid int PRIMARY KEY);"); $node_subscriber->safe_psql('postgres', -"CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" + "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" ); # Setup logical replication @@ -36,7 +36,7 @@ my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (copy_data = false)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (copy_data = false)" ); $node_publisher->wait_for_catchup($appname); diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl index a9a223bdf7..6677dde528 100644 --- a/src/test/subscription/t/004_sync.pl +++ b/src/test/subscription/t/004_sync.pl @@ -34,14 +34,14 @@ my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; @@ -57,7 +57,7 @@ # recreate the subscription, it will try to do initial copy $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" ); # but it will be stuck on data copy as it will fail on constraint @@ -79,12 +79,12 @@ # now check another subscription for the same node pair $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub2 CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (copy_data = false)" + "CREATE SUBSCRIPTION tap_sub2 CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (copy_data = false)" ); # wait for it to start $node_subscriber->poll_query_until('postgres', -"SELECT pid IS NOT NULL FROM pg_stat_subscription WHERE subname = 'tap_sub2' AND relid IS NULL" + "SELECT pid IS NOT NULL FROM pg_stat_subscription WHERE subname = 'tap_sub2' AND relid IS NULL" ) or die "Timed out while waiting for subscriber to start"; # and drop both subscriptions @@ -101,7 +101,7 @@ # recreate the subscription again $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" ); # and wait for data sync to finish again diff --git a/src/test/subscription/t/005_encoding.pl b/src/test/subscription/t/005_encoding.pl index 020bffbbe9..1977aa5cfe 100644 --- a/src/test/subscription/t/005_encoding.pl +++ b/src/test/subscription/t/005_encoding.pl @@ -27,14 +27,14 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION mypub FOR ALL TABLES;"); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" + "CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" ); $node_publisher->wait_for_catchup($appname); # Wait for initial sync to finish as well my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; diff --git a/src/test/subscription/t/006_rewrite.pl b/src/test/subscription/t/006_rewrite.pl index 907a913318..e470c071d2 100644 --- a/src/test/subscription/t/006_rewrite.pl +++ b/src/test/subscription/t/006_rewrite.pl @@ -23,14 +23,14 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION mypub FOR ALL TABLES;"); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" + "CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" ); $node_publisher->wait_for_catchup($appname); # Wait for initial sync to finish as well my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('s', 'r');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; diff --git a/src/test/subscription/t/007_ddl.pl b/src/test/subscription/t/007_ddl.pl index 97a927b078..2697ee5c58 100644 --- a/src/test/subscription/t/007_ddl.pl +++ b/src/test/subscription/t/007_ddl.pl @@ -23,7 +23,7 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION mypub FOR ALL TABLES;"); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" + "CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" ); $node_publisher->wait_for_catchup($appname); diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl index f2d5a09122..22b76f1b17 100644 --- a/src/test/subscription/t/008_diff_schema.pl +++ b/src/test/subscription/t/008_diff_schema.pl @@ -23,7 +23,7 @@ # Setup structure on subscriber $node_subscriber->safe_psql('postgres', -"CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999, e int GENERATED BY DEFAULT AS IDENTITY)" + "CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999, e int GENERATED BY DEFAULT AS IDENTITY)" ); # Setup logical replication @@ -33,14 +33,14 @@ my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; @@ -73,7 +73,7 @@ $node_publisher->wait_for_catchup($appname); $result = $node_subscriber->safe_psql('postgres', -"SELECT count(*), count(extract(epoch from c) = 987654321), count(d = 999) FROM test_tab" + "SELECT count(*), count(extract(epoch from c) = 987654321), count(d = 999) FROM test_tab" ); is($result, qq(2|2|2), 'check extra columns contain locally changed data'); diff --git a/src/test/subscription/t/009_matviews.pl b/src/test/subscription/t/009_matviews.pl index 0fc2e3e353..ea2ee420ca 100644 --- a/src/test/subscription/t/009_matviews.pl +++ b/src/test/subscription/t/009_matviews.pl @@ -19,7 +19,7 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION mypub FOR ALL TABLES;"); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" + "CREATE SUBSCRIPTION mysub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION mypub;" ); $node_publisher->safe_psql('postgres', diff --git a/src/test/subscription/t/010_truncate.pl b/src/test/subscription/t/010_truncate.pl index 39f2cdb9cd..de1443b55f 100644 --- a/src/test/subscription/t/010_truncate.pl +++ b/src/test/subscription/t/010_truncate.pl @@ -52,18 +52,18 @@ $node_publisher->safe_psql('postgres', "CREATE PUBLICATION pub3 FOR TABLE tab3, tab4"); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION sub1 CONNECTION '$publisher_connstr application_name=sub1' PUBLICATION pub1" + "CREATE SUBSCRIPTION sub1 CONNECTION '$publisher_connstr application_name=sub1' PUBLICATION pub1" ); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION sub2 CONNECTION '$publisher_connstr application_name=sub2' PUBLICATION pub2" + "CREATE SUBSCRIPTION sub2 CONNECTION '$publisher_connstr application_name=sub2' PUBLICATION pub2" ); $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION sub3 CONNECTION '$publisher_connstr application_name=sub3' PUBLICATION pub3" + "CREATE SUBSCRIPTION sub3 CONNECTION '$publisher_connstr application_name=sub3' PUBLICATION pub3" ); # Wait for initial sync of all subscriptions my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; diff --git a/src/tools/check_bison_recursion.pl b/src/tools/check_bison_recursion.pl index 9421eb93af..913faa02f7 100755 --- a/src/tools/check_bison_recursion.pl +++ b/src/tools/check_bison_recursion.pl @@ -82,7 +82,7 @@ && !grep { $cur_nonterminal eq $_ } @rhs) { print -"Right recursion in rule $rule_number: $cur_nonterminal := $rhs\n"; + "Right recursion in rule $rule_number: $cur_nonterminal := $rhs\n"; } } } diff --git a/src/tools/fix-old-flex-code.pl b/src/tools/fix-old-flex-code.pl index baa1feecb9..0e0b572673 100644 --- a/src/tools/fix-old-flex-code.pl +++ b/src/tools/fix-old-flex-code.pl @@ -37,7 +37,7 @@ # Apply the desired patch. $ccode =~ -s|(struct yyguts_t \* yyg = \(struct yyguts_t\*\)yyscanner; /\* This var may be unused depending upon options. \*/ + s|(struct yyguts_t \* yyg = \(struct yyguts_t\*\)yyscanner; /\* This var may be unused depending upon options. \*/ .*?) return yy_is_jam \? 0 : yy_current_state; |$1 diff --git a/src/tools/git_changelog b/src/tools/git_changelog index 5c41efa701..352dc1ca47 100755 --- a/src/tools/git_changelog +++ b/src/tools/git_changelog @@ -343,7 +343,7 @@ sub parse_datetime { my ($dt) = @_; $dt =~ -/^(\d\d\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)\s+([-+])(\d\d)(\d\d)$/; + /^(\d\d\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)\s+([-+])(\d\d)(\d\d)$/; my $gm = Time::Local::timegm($6, $5, $4, $3, $2 - 1, $1); my $tzoffset = ($8 * 60 + $9) * 60; $tzoffset = -$tzoffset if $7 eq '-'; diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 578426994d..4cc1b57c1b 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -361,14 +361,14 @@ sub GenerateConversionScript my $obj = shift @pieces; $sql .= "-- $se --> $de\n"; $sql .= -"CREATE OR REPLACE FUNCTION $func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '\$libdir/$obj', '$func' LANGUAGE C STRICT;\n"; + "CREATE OR REPLACE FUNCTION $func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '\$libdir/$obj', '$func' LANGUAGE C STRICT;\n"; $sql .= -"COMMENT ON FUNCTION $func(INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) IS 'internal conversion function for $se to $de';\n"; + "COMMENT ON FUNCTION $func(INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) IS 'internal conversion function for $se to $de';\n"; $sql .= "DROP CONVERSION pg_catalog.$name;\n"; $sql .= -"CREATE DEFAULT CONVERSION pg_catalog.$name FOR '$se' TO '$de' FROM $func;\n"; + "CREATE DEFAULT CONVERSION pg_catalog.$name FOR '$se' TO '$de' FROM $func;\n"; $sql .= -"COMMENT ON CONVERSION pg_catalog.$name IS 'conversion for $se to $de';\n\n"; + "COMMENT ON CONVERSION pg_catalog.$name IS 'conversion for $se to $de';\n\n"; } open($F, '>', "$target/share/conversion_create.sql") || die "Could not write to conversion_create.sql\n"; @@ -554,7 +554,7 @@ sub CopySubdirFiles # Special case for contrib/spi $flist = -"autoinc.example insert_username.example moddatetime.example refint.example timetravel.example" + "autoinc.example insert_username.example moddatetime.example refint.example timetravel.example" if ($module eq 'spi'); foreach my $f (split /\s+/, $flist) { @@ -713,7 +713,7 @@ sub GenerateNLSFiles my @args = ( "$nlspath\\bin\\msgfmt", '-o', -"$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", $_); system(@args) && croak("Could not run msgfmt on $dir\\$_"); print "."; diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 9ddccc7c55..ca6e8e5300 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -170,7 +170,7 @@ EOF if ($grammarFile =~ /\.y$/) { $outputFile =~ -s{^src\\pl\\plpgsql\\src\\gram.c$}{src\\pl\\plpgsql\\src\\pl_gram.c}; + s{^src\\pl\\plpgsql\\src\\gram.c$}{src\\pl\\plpgsql\\src\\pl_gram.c}; print $f < Running bison on $grammarFile @@ -328,7 +328,7 @@ EOF if ($self->{disablelinkerwarnings}) { print $f -" /ignore:$self->{disablelinkerwarnings} \%(AdditionalOptions)\n"; + " /ignore:$self->{disablelinkerwarnings} \%(AdditionalOptions)\n"; } if ($self->{implib}) { diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index d6d7b7a860..26c3510d64 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -543,7 +543,7 @@ sub mkvcbuild else { die -"could not identify perl library version matching pattern $perl_path\n"; + "could not identify perl library version matching pattern $perl_path\n"; } # Add defines from Perl's ccflags; see PGAC_CHECK_PERL_EMBED_CCFLAGS diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 696433d272..6b1207e6a8 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -157,7 +157,7 @@ sub GenerateFiles { s{PG_VERSION "[^"]+"}{PG_VERSION "$self->{strver}$extraver"}; s{PG_VERSION_NUM \d+}{PG_VERSION_NUM $self->{numver}}; -s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"}; + s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"}; print $o $_; } print $o "#define PG_MAJORVERSION \"$self->{majorver}\"\n"; @@ -271,7 +271,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c || IsNewer('fmgrtab.c', '../../../src/include/access/transam.h')) { system( -"perl -I ../catalog Gen_fmgrtab.pl -I../../../src/include/ $pg_language_dat $pg_proc_dat" + "perl -I ../catalog Gen_fmgrtab.pl -I../../../src/include/ $pg_language_dat $pg_proc_dat" ); } chdir('../../..'); @@ -322,7 +322,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating probes.h...\n"; system( -'perl src/backend/utils/Gen_dummy_probes.pl src/backend/utils/probes.d > src/include/utils/probes.h' + 'perl src/backend/utils/Gen_dummy_probes.pl src/backend/utils/probes.d > src/include/utils/probes.h' ); } @@ -333,7 +333,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating spiexceptions.h...\n"; system( -'perl src/pl/plpython/generate-spiexceptions.pl src/backend/utils/errcodes.txt > src/pl/plpython/spiexceptions.h' + 'perl src/pl/plpython/generate-spiexceptions.pl src/backend/utils/errcodes.txt > src/pl/plpython/spiexceptions.h' ); } @@ -343,7 +343,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating errcodes.h...\n"; system( -'perl src/backend/utils/generate-errcodes.pl src/backend/utils/errcodes.txt > src/backend/utils/errcodes.h' + 'perl src/backend/utils/generate-errcodes.pl src/backend/utils/errcodes.txt > src/backend/utils/errcodes.h' ); copyFile('src/backend/utils/errcodes.h', 'src/include/utils/errcodes.h'); @@ -355,7 +355,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating plerrcodes.h...\n"; system( -'perl src/pl/plpgsql/src/generate-plerrcodes.pl src/backend/utils/errcodes.txt > src/pl/plpgsql/src/plerrcodes.h' + 'perl src/pl/plpgsql/src/generate-plerrcodes.pl src/backend/utils/errcodes.txt > src/pl/plpgsql/src/plerrcodes.h' ); } @@ -365,7 +365,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating pltclerrcodes.h...\n"; system( -'perl src/pl/tcl/generate-pltclerrcodes.pl src/backend/utils/errcodes.txt > src/pl/tcl/pltclerrcodes.h' + 'perl src/pl/tcl/generate-pltclerrcodes.pl src/backend/utils/errcodes.txt > src/pl/tcl/pltclerrcodes.h' ); } @@ -375,7 +375,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c { print "Generating qsort_tuple.c...\n"; system( -'perl src/backend/utils/sort/gen_qsort_tuple.pl > src/backend/utils/sort/qsort_tuple.c' + 'perl src/backend/utils/sort/gen_qsort_tuple.pl > src/backend/utils/sort/qsort_tuple.c' ); } diff --git a/src/tools/msvc/VCBuildProject.pm b/src/tools/msvc/VCBuildProject.pm index 669ba1730b..d3a03c5bfd 100644 --- a/src/tools/msvc/VCBuildProject.pm +++ b/src/tools/msvc/VCBuildProject.pm @@ -130,7 +130,7 @@ EOF my $obj = $dir; $obj =~ s!/!_!g; print $f -">{platform}\">{name}\\$obj" + ">{platform}\">{name}\\$obj" . "_$file.obj\" />{platform}\">{name}\\$obj" . "_$file.obj\" />\n"; } @@ -195,7 +195,7 @@ EOF if ($self->{disablelinkerwarnings}) { print $f -"\t\tAdditionalOptions=\"/ignore:$self->{disablelinkerwarnings}\"\n"; + "\t\tAdditionalOptions=\"/ignore:$self->{disablelinkerwarnings}\"\n"; } if ($self->{implib}) { @@ -212,13 +212,13 @@ EOF print $f "\t/>\n"; print $f -"\t{name}\\$self->{name}.lib\" IgnoreDefaultLibraryNames=\"libc\" />\n"; + "\t{name}\\$self->{name}.lib\" IgnoreDefaultLibraryNames=\"libc\" />\n"; print $f -"\t\n"; + "\t\n"; if ($self->{builddef}) { print $f -"\t{name} $self->{platform}\" />\n"; + "\t{name} $self->{platform}\" />\n"; } print $f < @@ -232,7 +232,7 @@ sub WriteReferences foreach my $ref (@{ $self->{references} }) { print $f -" {guid}\" Name=\"$ref->{name}\" />\n"; + " {guid}\" Name=\"$ref->{name}\" />\n"; } print $f " \n"; } @@ -246,7 +246,7 @@ sub GenerateCustomTool . $self->GenerateCustomTool($desc, $tool, $output, 'Release'); } return -"{platform}\">"; + "{platform}\">"; } package VC2005Project; diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index 3e29089bae..d774f69b8b 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -123,14 +123,14 @@ sub DetermineVisualStudioVersion my $output = `nmake /? 2>&1`; $? >> 8 == 0 or croak -"Unable to determine Visual Studio version: The nmake command wasn't found."; + "Unable to determine Visual Studio version: The nmake command wasn't found."; if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m) { return _GetVisualStudioVersion($1, $2); } croak -"Unable to determine Visual Studio version: The nmake version could not be determined."; + "Unable to determine Visual Studio version: The nmake version could not be determined."; } sub _GetVisualStudioVersion @@ -141,13 +141,13 @@ sub _GetVisualStudioVersion if ($major > 14) { carp -"The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; + "The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; return '14.00'; } elsif ($major < 6) { croak -"Unable to determine Visual Studio version: Visual Studio versions before 6.0 aren't supported."; + "Unable to determine Visual Studio version: Visual Studio versions before 6.0 aren't supported."; } return "$major.$minor"; } diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl index 744c1f7d6e..9a234d1cc2 100644 --- a/src/tools/msvc/build.pl +++ b/src/tools/msvc/build.pl @@ -56,7 +56,7 @@ BEGIN if ($buildwhat and $vcver >= 10.00) { system( -"msbuild $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf" + "msbuild $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf" ); } elsif ($buildwhat) @@ -66,7 +66,8 @@ BEGIN else { system( -"msbuild pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"); + "msbuild pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf" + ); } # report status diff --git a/src/tools/msvc/builddoc.pl b/src/tools/msvc/builddoc.pl index e0b5c50b34..8ab7385b9e 100644 --- a/src/tools/msvc/builddoc.pl +++ b/src/tools/msvc/builddoc.pl @@ -58,7 +58,7 @@ system($cmd); die "features_unsupported" if $?; $cmd = -"perl generate-errcodes-table.pl \"../../../src/backend/utils/errcodes.txt\" " + "perl generate-errcodes-table.pl \"../../../src/backend/utils/errcodes.txt\" " . "> errcodes-table.sgml"; system($cmd); die "errcodes-table" if $?; diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 6838397948..f24f975e18 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -34,7 +34,7 @@ my $what = shift || ""; if ($what =~ -/^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck|recoverycheck|taptest)$/i + /^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck|recoverycheck|taptest)$/i ) { $what = uc $what; diff --git a/src/tools/pginclude/pgcheckdefines b/src/tools/pginclude/pgcheckdefines index dd12feeca2..c547df45ea 100755 --- a/src/tools/pginclude/pgcheckdefines +++ b/src/tools/pginclude/pgcheckdefines @@ -119,7 +119,7 @@ foreach my $file (@hfiles, @cfiles) $top_builddir = $top_builddir . "/.."; } $MAKECMD = -"$MAKE -qp 'subdir=$subdir' 'top_builddir=$top_builddir' -f '$top_builddir/src/Makefile.global'"; + "$MAKE -qp 'subdir=$subdir' 'top_builddir=$top_builddir' -f '$top_builddir/src/Makefile.global'"; } my ($CPPFLAGS, $CFLAGS, $CFLAGS_SL, $PTHREAD_CFLAGS, $CC); diff --git a/src/tools/pgindent/perltidyrc b/src/tools/pgindent/perltidyrc index 802b5df37b..e62f3c9c78 100644 --- a/src/tools/pgindent/perltidyrc +++ b/src/tools/pgindent/perltidyrc @@ -5,6 +5,7 @@ --entab-leading-whitespace=4 --keep-old-blank-lines=2 --maximum-line-length=78 +--nooutdent-long-quotes --nospace-for-semicolon --opening-brace-on-new-line --output-line-ending=unix diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index 2bbbd7b850..51350c981a 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -16,7 +16,7 @@ my $INDENT_VERSION = "2.0"; # Our standard indent settings my $indent_opts = -"-bad -bap -bbb -bc -bl -cli1 -cp33 -cdb -nce -d0 -di12 -nfc1 -i4 -l79 -lp -lpl -nip -npro -sac -tpg -ts4"; + "-bad -bap -bbb -bc -bl -cli1 -cp33 -cdb -nce -d0 -di12 -nfc1 -i4 -l79 -lp -lpl -nip -npro -sac -tpg -ts4"; my $devnull = File::Spec->devnull; @@ -80,7 +80,7 @@ sub check_indent if (`$indent --version` !~ m/ $INDENT_VERSION$/) { print STDERR -"You do not appear to have $indent version $INDENT_VERSION installed on your system.\n"; + "You do not appear to have $indent version $INDENT_VERSION installed on your system.\n"; exit 1; } @@ -209,7 +209,7 @@ sub pre_indent my $extern_c_start = '/* Open extern "C" */'; my $extern_c_stop = '/* Close extern "C" */'; $source =~ -s!(^#ifdef[ \t]+__cplusplus.*\nextern[ \t]+"C"[ \t]*\n)\{[ \t]*$!$1$extern_c_start!gm; + s!(^#ifdef[ \t]+__cplusplus.*\nextern[ \t]+"C"[ \t]*\n)\{[ \t]*$!$1$extern_c_start!gm; $source =~ s!(^#ifdef[ \t]+__cplusplus.*\n)\}[ \t]*$!$1$extern_c_stop!gm; # Protect wrapping in CATALOG() diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl index dc3173bf6a..392fd4ae54 100755 --- a/src/tools/version_stamp.pl +++ b/src/tools/version_stamp.pl @@ -83,8 +83,8 @@ open(my $fh, '<', "configure.in") || die "could not read configure.in: $!\n"; while (<$fh>) { - if ( -m/^m4_if\(m4_defn\(\[m4_PACKAGE_VERSION\]\), \[(.*)\], \[\], \[m4_fatal/) + if (m/^m4_if\(m4_defn\(\[m4_PACKAGE_VERSION\]\), \[(.*)\], \[\], \[m4_fatal/ + ) { $aconfver = $1; last; @@ -99,29 +99,29 @@ my $fixedfiles = ""; sed_file("configure.in", -"-e 's/AC_INIT(\\[PostgreSQL\\], \\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'" + "-e 's/AC_INIT(\\[PostgreSQL\\], \\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'" ); sed_file("doc/bug.template", -"-e 's/PostgreSQL version (example: PostgreSQL .*) *: PostgreSQL .*/PostgreSQL version (example: PostgreSQL $fullversion): PostgreSQL $fullversion/'" + "-e 's/PostgreSQL version (example: PostgreSQL .*) *: PostgreSQL .*/PostgreSQL version (example: PostgreSQL $fullversion): PostgreSQL $fullversion/'" ); sed_file("src/include/pg_config.h.win32", -"-e 's/#define PACKAGE_STRING \"PostgreSQL .*\"/#define PACKAGE_STRING \"PostgreSQL $fullversion\"/' " + "-e 's/#define PACKAGE_STRING \"PostgreSQL .*\"/#define PACKAGE_STRING \"PostgreSQL $fullversion\"/' " . "-e 's/#define PACKAGE_VERSION \".*\"/#define PACKAGE_VERSION \"$fullversion\"/' " . "-e 's/#define PG_VERSION \".*\"/#define PG_VERSION \"$fullversion\"/' " . "-e 's/#define PG_VERSION_NUM .*/#define PG_VERSION_NUM $padnumericversion/'" ); sed_file("src/interfaces/libpq/libpq.rc.in", -"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " + "-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/' " . "-e 's/VALUE \"FileVersion\", \"[0-9.]*/VALUE \"FileVersion\", \"$numericversion/' " . "-e 's/VALUE \"ProductVersion\", \"[0-9.]*/VALUE \"ProductVersion\", \"$numericversion/'" ); sed_file("src/port/win32ver.rc", -"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " + "-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/'" ); diff --git a/src/tools/win32tzlist.pl b/src/tools/win32tzlist.pl index ca81219164..4610d43f8f 100755 --- a/src/tools/win32tzlist.pl +++ b/src/tools/win32tzlist.pl @@ -102,7 +102,7 @@ if ($sys->{display} ne $file->{display}) { print -"Timezone $sys->{std} changed displayname ('$sys->{display}' from '$file->{display}')!\n"; + "Timezone $sys->{std} changed displayname ('$sys->{display}' from '$file->{display}')!\n"; } last; } @@ -119,7 +119,7 @@ for my $z (@add) { print -"\t{\n\t\t\"$z->{std}\", \"$z->{dlt}\",\n\t\t\"FIXME\"\n\t},\t\t\t\t\t\t\t/* $z->{display} */\n"; + "\t{\n\t\t\"$z->{std}\", \"$z->{dlt}\",\n\t\t\"FIXME\"\n\t},\t\t\t\t\t\t\t/* $z->{display} */\n"; } } -- 2.17.0