From 085446f8f50c567466fc885698b57155de237015 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 1 Aug 2023 13:44:16 +0200 Subject: [PATCH v2] Make all Perl warnings fatal --- config/check_modules.pl | 2 +- contrib/amcheck/t/001_verify_heapam.pl | 2 +- contrib/amcheck/t/002_cic.pl | 2 +- contrib/amcheck/t/003_cic_2pc.pl | 2 +- contrib/auto_explain/t/001_auto_explain.pl | 2 +- contrib/basebackup_to_shell/t/001_basic.pl | 2 +- contrib/bloom/t/001_wal.pl | 2 +- contrib/fuzzystrmatch/daitch_mokotoff_header.pl | 2 +- contrib/intarray/bench/bench.pl | 2 +- contrib/intarray/bench/create_test.pl | 2 +- contrib/oid2name/t/001_basic.pl | 2 +- contrib/pg_prewarm/t/001_basic.pl | 2 +- contrib/seg/seg-validate.pl | 2 +- contrib/seg/sort-segments.pl | 2 +- contrib/test_decoding/t/001_repl_stats.pl | 2 +- contrib/vacuumlo/t/001_basic.pl | 2 +- doc/src/sgml/generate-errcodes-table.pl | 2 +- doc/src/sgml/generate-keywords-table.pl | 2 +- doc/src/sgml/mk_feature_tables.pl | 2 +- src/backend/catalog/Catalog.pm | 2 +- src/backend/catalog/genbki.pl | 2 +- src/backend/nodes/gen_node_support.pl | 2 +- src/backend/parser/check_keywords.pl | 2 +- src/backend/snowball/snowball_create.pl | 2 +- src/backend/storage/lmgr/generate-lwlocknames.pl | 2 +- src/backend/utils/Gen_fmgrtab.pl | 2 +- .../utils/activity/generate-wait_event_types.pl | 2 +- src/backend/utils/generate-errcodes.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_BIG5.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_GB18030.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_SJIS.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_UHC.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_most.pl | 2 +- src/backend/utils/mb/Unicode/convutils.pm | 2 +- src/bin/initdb/t/001_initdb.pl | 2 +- src/bin/pg_amcheck/t/001_basic.pl | 2 +- src/bin/pg_amcheck/t/002_nonesuch.pl | 2 +- src/bin/pg_amcheck/t/003_check.pl | 2 +- src/bin/pg_amcheck/t/004_verify_heapam.pl | 2 +- src/bin/pg_amcheck/t/005_opclass_damage.pl | 2 +- src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl | 2 +- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +- src/bin/pg_basebackup/t/011_in_place_tablespace.pl | 2 +- src/bin/pg_basebackup/t/020_pg_receivewal.pl | 2 +- src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 2 +- src/bin/pg_checksums/t/001_basic.pl | 2 +- src/bin/pg_checksums/t/002_actions.pl | 2 +- src/bin/pg_config/t/001_pg_config.pl | 2 +- src/bin/pg_controldata/t/001_pg_controldata.pl | 2 +- src/bin/pg_ctl/t/001_start_stop.pl | 2 +- src/bin/pg_ctl/t/002_status.pl | 2 +- src/bin/pg_ctl/t/003_promote.pl | 2 +- src/bin/pg_ctl/t/004_logrotate.pl | 2 +- src/bin/pg_dump/t/001_basic.pl | 2 +- src/bin/pg_dump/t/002_pg_dump.pl | 2 +- src/bin/pg_dump/t/003_pg_dump_with_server.pl | 2 +- src/bin/pg_dump/t/004_pg_dump_parallel.pl | 2 +- src/bin/pg_dump/t/010_dump_connstr.pl | 2 +- src/bin/pg_resetwal/t/001_basic.pl | 2 +- src/bin/pg_resetwal/t/002_corrupted.pl | 2 +- src/bin/pg_rewind/t/001_basic.pl | 2 +- src/bin/pg_rewind/t/002_databases.pl | 2 +- src/bin/pg_rewind/t/003_extrafiles.pl | 2 +- src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 2 +- src/bin/pg_rewind/t/005_same_timeline.pl | 2 +- src/bin/pg_rewind/t/006_options.pl | 2 +- src/bin/pg_rewind/t/007_standby_source.pl | 2 +- src/bin/pg_rewind/t/008_min_recovery_point.pl | 2 +- src/bin/pg_rewind/t/009_growing_files.pl | 2 +- src/bin/pg_rewind/t/RewindTest.pm | 2 +- src/bin/pg_test_fsync/t/001_basic.pl | 2 +- src/bin/pg_test_timing/t/001_basic.pl | 2 +- src/bin/pg_upgrade/t/001_basic.pl | 2 +- src/bin/pg_upgrade/t/002_pg_upgrade.pl | 2 +- src/bin/pg_verifybackup/t/001_basic.pl | 2 +- src/bin/pg_verifybackup/t/002_algorithm.pl | 2 +- src/bin/pg_verifybackup/t/003_corruption.pl | 2 +- src/bin/pg_verifybackup/t/004_options.pl | 2 +- src/bin/pg_verifybackup/t/005_bad_manifest.pl | 2 +- src/bin/pg_verifybackup/t/006_encoding.pl | 2 +- src/bin/pg_verifybackup/t/007_wal.pl | 2 +- src/bin/pg_verifybackup/t/008_untar.pl | 2 +- src/bin/pg_verifybackup/t/009_extract.pl | 2 +- src/bin/pg_verifybackup/t/010_client_untar.pl | 2 +- src/bin/pg_waldump/t/001_basic.pl | 2 +- src/bin/pg_waldump/t/002_save_fullpage.pl | 2 +- src/bin/pgbench/t/001_pgbench_with_server.pl | 2 +- src/bin/pgbench/t/002_pgbench_no_server.pl | 2 +- src/bin/psql/create_help.pl | 2 +- src/bin/psql/t/001_basic.pl | 2 +- src/bin/psql/t/010_tab_completion.pl | 2 +- src/bin/psql/t/020_cancel.pl | 2 +- src/bin/scripts/t/010_clusterdb.pl | 2 +- src/bin/scripts/t/011_clusterdb_all.pl | 2 +- src/bin/scripts/t/020_createdb.pl | 2 +- src/bin/scripts/t/040_createuser.pl | 2 +- src/bin/scripts/t/050_dropdb.pl | 2 +- src/bin/scripts/t/070_dropuser.pl | 2 +- src/bin/scripts/t/080_pg_isready.pl | 2 +- src/bin/scripts/t/090_reindexdb.pl | 2 +- src/bin/scripts/t/091_reindexdb_all.pl | 2 +- src/bin/scripts/t/100_vacuumdb.pl | 2 +- src/bin/scripts/t/101_vacuumdb_all.pl | 2 +- src/bin/scripts/t/102_vacuumdb_stages.pl | 2 +- src/bin/scripts/t/200_connstr.pl | 2 +- src/common/unicode/generate-norm_test_table.pl | 2 +- .../unicode/generate-unicode_east_asian_fw_table.pl | 2 +- .../unicode/generate-unicode_nonspacing_table.pl | 2 +- src/common/unicode/generate-unicode_norm_table.pl | 2 +- src/common/unicode/generate-unicode_normprops_table.pl | 2 +- src/include/catalog/duplicate_oids | 2 +- src/include/catalog/reformat_dat_file.pl | 2 +- src/include/catalog/renumber_oids.pl | 2 +- src/include/catalog/unused_oids | 2 +- src/interfaces/ecpg/preproc/check_rules.pl | 2 +- src/interfaces/ecpg/preproc/parse.pl | 2 +- src/interfaces/libpq/t/001_uri.pl | 2 +- src/interfaces/libpq/t/002_api.pl | 2 +- src/interfaces/libpq/t/003_load_balance_host_list.pl | 2 +- src/interfaces/libpq/t/004_load_balance_dns.pl | 2 +- src/pl/plperl/plc_perlboot.pl | 6 +++--- src/pl/plperl/plperl_opmask.pl | 2 +- src/pl/plperl/text2macro.pl | 2 +- src/pl/plpgsql/src/generate-plerrcodes.pl | 2 +- src/pl/plpython/generate-spiexceptions.pl | 2 +- src/pl/tcl/generate-pltclerrcodes.pl | 2 +- src/test/authentication/t/001_password.pl | 2 +- src/test/authentication/t/002_saslprep.pl | 2 +- src/test/authentication/t/003_peer.pl | 2 +- src/test/authentication/t/004_file_inclusion.pl | 2 +- src/test/authentication/t/005_sspi.pl | 2 +- src/test/icu/t/010_database.pl | 2 +- src/test/kerberos/t/001_auth.pl | 2 +- src/test/ldap/LdapServer.pm | 2 +- src/test/ldap/t/001_auth.pl | 2 +- src/test/ldap/t/002_bindpasswd.pl | 2 +- src/test/locale/sort-test.pl | 2 +- src/test/modules/brin/t/01_workitems.pl | 2 +- src/test/modules/brin/t/02_wal_consistency.pl | 2 +- src/test/modules/commit_ts/t/001_base.pl | 2 +- src/test/modules/commit_ts/t/002_standby.pl | 2 +- src/test/modules/commit_ts/t/003_standby_2.pl | 2 +- src/test/modules/commit_ts/t/004_restart.pl | 2 +- .../ldap_password_func/t/001_mutated_bindpasswd.pl | 2 +- .../modules/libpq_pipeline/t/001_libpq_pipeline.pl | 2 +- .../modules/ssl_passphrase_callback/t/001_testfunc.pl | 2 +- src/test/modules/test_custom_rmgrs/t/001_basic.pl | 2 +- .../modules/test_misc/t/001_constraint_validation.pl | 2 +- src/test/modules/test_misc/t/002_tablespace.pl | 2 +- src/test/modules/test_misc/t/003_check_guc.pl | 2 +- src/test/modules/test_misc/t/004_io_direct.pl | 2 +- src/test/modules/test_pg_dump/t/001_base.pl | 2 +- src/test/modules/worker_spi/t/001_worker_spi.pl | 2 +- src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm | 2 +- src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 2 +- src/test/perl/PostgreSQL/Test/Cluster.pm | 2 +- src/test/perl/PostgreSQL/Test/RecursiveCopy.pm | 2 +- src/test/perl/PostgreSQL/Test/SimpleTee.pm | 2 +- src/test/perl/PostgreSQL/Test/Utils.pm | 2 +- src/test/perl/PostgreSQL/Version.pm | 2 +- src/test/perl/README | 2 +- src/test/recovery/t/001_stream_rep.pl | 2 +- src/test/recovery/t/002_archiving.pl | 2 +- src/test/recovery/t/003_recovery_targets.pl | 2 +- src/test/recovery/t/004_timeline_switch.pl | 2 +- src/test/recovery/t/005_replay_delay.pl | 2 +- src/test/recovery/t/006_logical_decoding.pl | 2 +- src/test/recovery/t/007_sync_rep.pl | 2 +- src/test/recovery/t/008_fsm_truncation.pl | 2 +- src/test/recovery/t/009_twophase.pl | 2 +- src/test/recovery/t/010_logical_decoding_timelines.pl | 2 +- src/test/recovery/t/012_subtransactions.pl | 2 +- src/test/recovery/t/013_crash_restart.pl | 2 +- src/test/recovery/t/014_unlogged_reinit.pl | 2 +- src/test/recovery/t/015_promotion_pages.pl | 2 +- src/test/recovery/t/016_min_consistency.pl | 2 +- src/test/recovery/t/017_shm.pl | 2 +- src/test/recovery/t/018_wal_optimize.pl | 2 +- src/test/recovery/t/019_replslot_limit.pl | 2 +- src/test/recovery/t/020_archive_status.pl | 2 +- src/test/recovery/t/021_row_visibility.pl | 2 +- src/test/recovery/t/022_crash_temp_files.pl | 2 +- src/test/recovery/t/023_pitr_prepared_xact.pl | 2 +- src/test/recovery/t/024_archive_recovery.pl | 2 +- src/test/recovery/t/025_stuck_on_old_timeline.pl | 2 +- src/test/recovery/t/026_overwrite_contrecord.pl | 2 +- src/test/recovery/t/027_stream_regress.pl | 2 +- src/test/recovery/t/028_pitr_timelines.pl | 2 +- src/test/recovery/t/029_stats_restart.pl | 2 +- src/test/recovery/t/030_stats_cleanup_replica.pl | 2 +- src/test/recovery/t/031_recovery_conflict.pl | 2 +- src/test/recovery/t/032_relfilenode_reuse.pl | 2 +- src/test/recovery/t/033_replay_tsp_drops.pl | 2 +- src/test/recovery/t/034_create_database.pl | 2 +- src/test/recovery/t/035_standby_logical_decoding.pl | 2 +- src/test/recovery/t/036_truncated_dropped.pl | 2 +- src/test/recovery/t/037_invalid_database.pl | 2 +- src/test/recovery/t/cp_history_files | 2 +- src/test/ssl/t/001_ssltests.pl | 4 +++- src/test/ssl/t/002_scram.pl | 2 +- src/test/ssl/t/003_sslinfo.pl | 2 +- src/test/ssl/t/SSL/Backend/OpenSSL.pm | 2 +- src/test/ssl/t/SSL/Server.pm | 2 +- src/test/subscription/t/001_rep_changes.pl | 2 +- src/test/subscription/t/002_types.pl | 2 +- src/test/subscription/t/003_constraints.pl | 2 +- src/test/subscription/t/004_sync.pl | 2 +- src/test/subscription/t/005_encoding.pl | 2 +- src/test/subscription/t/006_rewrite.pl | 2 +- src/test/subscription/t/007_ddl.pl | 2 +- src/test/subscription/t/008_diff_schema.pl | 2 +- src/test/subscription/t/009_matviews.pl | 2 +- src/test/subscription/t/010_truncate.pl | 2 +- src/test/subscription/t/011_generated.pl | 2 +- src/test/subscription/t/012_collation.pl | 2 +- src/test/subscription/t/013_partition.pl | 2 +- src/test/subscription/t/014_binary.pl | 2 +- src/test/subscription/t/015_stream.pl | 2 +- src/test/subscription/t/016_stream_subxact.pl | 2 +- src/test/subscription/t/017_stream_ddl.pl | 2 +- src/test/subscription/t/018_stream_subxact_abort.pl | 2 +- .../subscription/t/019_stream_subxact_ddl_abort.pl | 2 +- src/test/subscription/t/020_messages.pl | 2 +- src/test/subscription/t/021_twophase.pl | 2 +- src/test/subscription/t/022_twophase_cascade.pl | 2 +- src/test/subscription/t/023_twophase_stream.pl | 2 +- src/test/subscription/t/024_add_drop_pub.pl | 2 +- src/test/subscription/t/025_rep_changes_for_schema.pl | 2 +- src/test/subscription/t/026_stats.pl | 2 +- src/test/subscription/t/027_nosuperuser.pl | 2 +- src/test/subscription/t/028_row_filter.pl | 2 +- src/test/subscription/t/029_on_error.pl | 2 +- src/test/subscription/t/030_origin.pl | 2 +- src/test/subscription/t/031_column_list.pl | 2 +- src/test/subscription/t/032_subscribe_use_index.pl | 2 +- src/test/subscription/t/033_run_as_table_owner.pl | 2 +- src/test/subscription/t/100_bugs.pl | 2 +- src/tools/PerfectHash.pm | 2 +- src/tools/check_bison_recursion.pl | 2 +- src/tools/ci/windows_build_config.pl | 2 +- src/tools/copyright.pl | 2 +- src/tools/fix-old-flex-code.pl | 2 +- src/tools/gen_export.pl | 2 +- src/tools/gen_keywordlist.pl | 2 +- src/tools/git_changelog | 2 +- src/tools/mark_pgdllimport.pl | 2 +- src/tools/msvc/Install.pm | 2 +- src/tools/msvc/MSBuildProject.pm | 10 +++++----- src/tools/msvc/Mkvcbuild.pm | 2 +- src/tools/msvc/Project.pm | 2 +- src/tools/msvc/Solution.pm | 10 +++++----- src/tools/msvc/VSObjectFactory.pm | 2 +- src/tools/msvc/build.pl | 2 +- src/tools/msvc/config_default.pl | 2 +- src/tools/msvc/dummylib/Win32.pm | 2 +- src/tools/msvc/dummylib/Win32/Registry.pm | 2 +- src/tools/msvc/dummylib/Win32API/File.pm | 2 +- src/tools/msvc/gendef.pl | 2 +- src/tools/msvc/install.pl | 2 +- src/tools/msvc/mkvcbuild.pl | 2 +- src/tools/msvc/pgbison.pl | 2 +- src/tools/msvc/pgflex.pl | 2 +- src/tools/msvc/vcregress.pl | 2 +- src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl | 2 +- src/tools/pginclude/pgcheckdefines | 2 +- src/tools/pgindent/pgindent | 2 +- src/tools/version_stamp.pl | 2 +- src/tools/win32tzlist.pl | 2 +- 275 files changed, 287 insertions(+), 285 deletions(-) diff --git a/config/check_modules.pl b/config/check_modules.pl index 611f3a673f..1599abcc0b 100644 --- a/config/check_modules.pl +++ b/config/check_modules.pl @@ -5,7 +5,7 @@ # but specify them anyway for documentation's sake.) # use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use IPC::Run 0.79; diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl index 46d5b53181..c9caa48169 100644 --- a/contrib/amcheck/t/001_verify_heapam.pl +++ b/contrib/amcheck/t/001_verify_heapam.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/amcheck/t/002_cic.pl b/contrib/amcheck/t/002_cic.pl index 42a047a357..f0b5d8f7e4 100644 --- a/contrib/amcheck/t/002_cic.pl +++ b/contrib/amcheck/t/002_cic.pl @@ -3,7 +3,7 @@ # Test CREATE INDEX CONCURRENTLY with concurrent modifications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl index 3279a2505a..a5eb2d9d69 100644 --- a/contrib/amcheck/t/003_cic_2pc.pl +++ b/contrib/amcheck/t/003_cic_2pc.pl @@ -3,7 +3,7 @@ # Test CREATE INDEX CONCURRENTLY with concurrent prepared-xact modifications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/auto_explain/t/001_auto_explain.pl b/contrib/auto_explain/t/001_auto_explain.pl index abb422f8de..2720215dbc 100644 --- a/contrib/auto_explain/t/001_auto_explain.pl +++ b/contrib/auto_explain/t/001_auto_explain.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl index e2cdd2ecb0..221f5b2296 100644 --- a/contrib/basebackup_to_shell/t/001_basic.pl +++ b/contrib/basebackup_to_shell/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl index 2a69ff1a74..7e8c2b1a3d 100644 --- a/contrib/bloom/t/001_wal.pl +++ b/contrib/bloom/t/001_wal.pl @@ -3,7 +3,7 @@ # Test generic xlog record work for bloom index replication. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/fuzzystrmatch/daitch_mokotoff_header.pl b/contrib/fuzzystrmatch/daitch_mokotoff_header.pl index 51a40e7748..5ee0d1cc7c 100755 --- a/contrib/fuzzystrmatch/daitch_mokotoff_header.pl +++ b/contrib/fuzzystrmatch/daitch_mokotoff_header.pl @@ -9,7 +9,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; die "Usage: $0 OUTPUT_FILE\n" if @ARGV != 1; my $output_file = $ARGV[0]; diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl index 067654986e..ba8163ce11 100755 --- a/contrib/intarray/bench/bench.pl +++ b/contrib/intarray/bench/bench.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; # make sure we are in a sane environment. use DBI(); diff --git a/contrib/intarray/bench/create_test.pl b/contrib/intarray/bench/create_test.pl index 6efe9151ca..f6ffc5b452 100755 --- a/contrib/intarray/bench/create_test.pl +++ b/contrib/intarray/bench/create_test.pl @@ -5,7 +5,7 @@ # contrib/intarray/bench/create_test.pl use strict; -use warnings; +use warnings FATAL => 'all'; print < 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/pg_prewarm/t/001_basic.pl b/contrib/pg_prewarm/t/001_basic.pl index 6b7c869afc..b2f86c1a25 100644 --- a/contrib/pg_prewarm/t/001_basic.pl +++ b/contrib/pg_prewarm/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/seg/seg-validate.pl b/contrib/seg/seg-validate.pl index 67c0015e6b..b21af13140 100755 --- a/contrib/seg/seg-validate.pl +++ b/contrib/seg/seg-validate.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $integer = '[+-]?[0-9]+'; my $real = '[+-]?[0-9]+\.[0-9]+'; diff --git a/contrib/seg/sort-segments.pl b/contrib/seg/sort-segments.pl index 3cc21a3ba0..9bd71c0391 100755 --- a/contrib/seg/sort-segments.pl +++ b/contrib/seg/sort-segments.pl @@ -5,7 +5,7 @@ # this script will sort any table with the segment data type in its last column use strict; -use warnings; +use warnings FATAL => 'all'; my @rows; diff --git a/contrib/test_decoding/t/001_repl_stats.pl b/contrib/test_decoding/t/001_repl_stats.pl index 7c2d87561c..da466bdacf 100644 --- a/contrib/test_decoding/t/001_repl_stats.pl +++ b/contrib/test_decoding/t/001_repl_stats.pl @@ -4,7 +4,7 @@ # Test replication statistics data in pg_stat_replication_slots is sane after # drop replication slot and restart. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/vacuumlo/t/001_basic.pl b/contrib/vacuumlo/t/001_basic.pl index 75067863de..4e6566d86b 100644 --- a/contrib/vacuumlo/t/001_basic.pl +++ b/contrib/vacuumlo/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/doc/src/sgml/generate-errcodes-table.pl b/doc/src/sgml/generate-errcodes-table.pl index 51f22bde95..e4df6d9ece 100644 --- a/doc/src/sgml/generate-errcodes-table.pl +++ b/doc/src/sgml/generate-errcodes-table.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "\n"; diff --git a/doc/src/sgml/generate-keywords-table.pl b/doc/src/sgml/generate-keywords-table.pl index ee44edaa6c..145d131670 100644 --- a/doc/src/sgml/generate-keywords-table.pl +++ b/doc/src/sgml/generate-keywords-table.pl @@ -5,7 +5,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my @sql_versions = reverse sort ('1992', '2016', '2023'); diff --git a/doc/src/sgml/mk_feature_tables.pl b/doc/src/sgml/mk_feature_tables.pl index 824be729a0..69b1d3a1a7 100644 --- a/doc/src/sgml/mk_feature_tables.pl +++ b/doc/src/sgml/mk_feature_tables.pl @@ -3,7 +3,7 @@ # doc/src/sgml/mk_feature_tables.pl use strict; -use warnings; +use warnings FATAL => 'all'; my $yesno = $ARGV[0]; diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm index b15f513183..4f1e9b5181 100644 --- a/src/backend/catalog/Catalog.pm +++ b/src/backend/catalog/Catalog.pm @@ -14,7 +14,7 @@ package Catalog; use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl index 4a7205472c..dc6f13a89b 100644 --- a/src/backend/catalog/genbki.pl +++ b/src/backend/catalog/genbki.pl @@ -14,7 +14,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/backend/nodes/gen_node_support.pl b/src/backend/nodes/gen_node_support.pl index 72c7963578..c7091d6bf2 100644 --- a/src/backend/nodes/gen_node_support.pl +++ b/src/backend/nodes/gen_node_support.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use Getopt::Long; diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl index e9b6f40eaa..cc58ce88a9 100644 --- a/src/backend/parser/check_keywords.pl +++ b/src/backend/parser/check_keywords.pl @@ -7,7 +7,7 @@ # Copyright (c) 2009-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $gram_filename = $ARGV[0]; my $kwlist_filename = $ARGV[1]; diff --git a/src/backend/snowball/snowball_create.pl b/src/backend/snowball/snowball_create.pl index 35d1cd9621..f1c5d160de 100644 --- a/src/backend/snowball/snowball_create.pl +++ b/src/backend/snowball/snowball_create.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $outdir_path = ''; diff --git a/src/backend/storage/lmgr/generate-lwlocknames.pl b/src/backend/storage/lmgr/generate-lwlocknames.pl index 863c88252b..34bac0faf5 100644 --- a/src/backend/storage/lmgr/generate-lwlocknames.pl +++ b/src/backend/storage/lmgr/generate-lwlocknames.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = '.'; diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl index 764216c56d..d0f3652136 100644 --- a/src/backend/utils/Gen_fmgrtab.pl +++ b/src/backend/utils/Gen_fmgrtab.pl @@ -17,7 +17,7 @@ use Catalog; use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = ''; diff --git a/src/backend/utils/activity/generate-wait_event_types.pl b/src/backend/utils/activity/generate-wait_event_types.pl index 23eb3b1f57..8d9fd2e03f 100644 --- a/src/backend/utils/activity/generate-wait_event_types.pl +++ b/src/backend/utils/activity/generate-wait_event_types.pl @@ -15,7 +15,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = '.'; diff --git a/src/backend/utils/generate-errcodes.pl b/src/backend/utils/generate-errcodes.pl index 34d0f25c23..42730e8c1a 100644 --- a/src/backend/utils/generate-errcodes.pl +++ b/src/backend/utils/generate-errcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $outfile = ''; diff --git a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl index 4c5724b8b7..41fe881e1b 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl @@ -25,7 +25,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl index f9ff2bd3d2..a14e4ac820 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for GB18030 use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl index 2d0e05fb79..4b77ecc694 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl @@ -8,7 +8,7 @@ # "euc-jis-2004-std.txt" (http://x0213.org) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl index 4073578027..41c825dbe7 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl @@ -12,7 +12,7 @@ # organization's ftp site. use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl index 9112e1cfe9..ff2a644012 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl @@ -17,7 +17,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl index 4ad17064ab..d2a3dac589 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl @@ -18,7 +18,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl index 9c8a983bf7..88c9c374b2 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for GB18030 use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl index f50baa8f1f..decf8ab443 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl @@ -16,7 +16,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl index ed010a58fa..eb57ca89c5 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl @@ -8,7 +8,7 @@ # "sjis-0213-2004-std.txt" (http://x0213.org) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl index 0808c6836b..3ef8960ade 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl @@ -11,7 +11,7 @@ # ftp site. use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl index 207677d76d..cc8b7d804c 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for UHC use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl b/src/backend/utils/mb/Unicode/UCS_to_most.pl index a1947308ff..2a095b7d7d 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_most.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl @@ -16,7 +16,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm index 77de7b1a4d..0f55d9621b 100644 --- a/src/backend/utils/mb/Unicode/convutils.pm +++ b/src/backend/utils/mb/Unicode/convutils.pm @@ -6,7 +6,7 @@ package convutils; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Exporter 'import'; diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl index 2d7469d2fc..407ca92968 100644 --- a/src/bin/initdb/t/001_initdb.pl +++ b/src/bin/initdb/t/001_initdb.pl @@ -6,7 +6,7 @@ # Successful initdb consumes much time and I/O. use strict; -use warnings; +use warnings FATAL => 'all'; use Fcntl ':mode'; use File::stat qw{lstat}; use PostgreSQL::Test::Cluster; diff --git a/src/bin/pg_amcheck/t/001_basic.pl b/src/bin/pg_amcheck/t/001_basic.pl index 1f1e33278b..9737d965aa 100644 --- a/src/bin/pg_amcheck/t/001_basic.pl +++ b/src/bin/pg_amcheck/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl index 99b94dd022..df7ff5397a 100644 --- a/src/bin/pg_amcheck/t/002_nonesuch.pl +++ b/src/bin/pg_amcheck/t/002_nonesuch.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/003_check.pl b/src/bin/pg_amcheck/t/003_check.pl index d577cffa30..3727906f98 100644 --- a/src/bin/pg_amcheck/t/003_check.pl +++ b/src/bin/pg_amcheck/t/003_check.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/004_verify_heapam.pl b/src/bin/pg_amcheck/t/004_verify_heapam.pl index 1b5027c420..0f57adabe6 100644 --- a/src/bin/pg_amcheck/t/004_verify_heapam.pl +++ b/src/bin/pg_amcheck/t/004_verify_heapam.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/005_opclass_damage.pl b/src/bin/pg_amcheck/t/005_opclass_damage.pl index fd476179f4..f2ea5fed40 100644 --- a/src/bin/pg_amcheck/t/005_opclass_damage.pl +++ b/src/bin/pg_amcheck/t/005_opclass_damage.pl @@ -5,7 +5,7 @@ # presence of breaking sort order changes. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl b/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl index 18a82ff002..279c438345 100644 --- a/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl +++ b/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index b9f5e1266b..c4c197ae1a 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename qw(basename dirname); use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; diff --git a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl index d58696e8f9..da7154362e 100644 --- a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl +++ b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl index 374f090a8b..765049ee96 100644 --- a/src/bin/pg_basebackup/t/020_pg_receivewal.pl +++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl index 62dca5b67a..1bbe88da14 100644 --- a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl +++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/pg_checksums/t/001_basic.pl b/src/bin/pg_checksums/t/001_basic.pl index d3601a5dd8..cfc147b77c 100644 --- a/src/bin/pg_checksums/t/001_basic.pl +++ b/src/bin/pg_checksums/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl index 2d63182d59..207dc8ec9c 100644 --- a/src/bin/pg_checksums/t/002_actions.pl +++ b/src/bin/pg_checksums/t/002_actions.pl @@ -5,7 +5,7 @@ # an initialized cluster. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_config/t/001_pg_config.pl b/src/bin/pg_config/t/001_pg_config.pl index 24acf7872b..693f7be054 100644 --- a/src/bin/pg_config/t/001_pg_config.pl +++ b/src/bin/pg_config/t/001_pg_config.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_controldata/t/001_pg_controldata.pl b/src/bin/pg_controldata/t/001_pg_controldata.pl index 0c641036e9..eed301030e 100644 --- a/src/bin/pg_controldata/t/001_pg_controldata.pl +++ b/src/bin/pg_controldata/t/001_pg_controldata.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl index f019fe1703..e072916dfa 100644 --- a/src/bin/pg_ctl/t/001_start_stop.pl +++ b/src/bin/pg_ctl/t/001_start_stop.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/002_status.pl b/src/bin/pg_ctl/t/002_status.pl index f5c50f6a7d..95bba696a4 100644 --- a/src/bin/pg_ctl/t/002_status.pl +++ b/src/bin/pg_ctl/t/002_status.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/003_promote.pl b/src/bin/pg_ctl/t/003_promote.pl index 0e83933098..f38e02f4a2 100644 --- a/src/bin/pg_ctl/t/003_promote.pl +++ b/src/bin/pg_ctl/t/003_promote.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/004_logrotate.pl b/src/bin/pg_ctl/t/004_logrotate.pl index 8d48e56ee9..912d89b5d6 100644 --- a/src/bin/pg_ctl/t/004_logrotate.pl +++ b/src/bin/pg_ctl/t/004_logrotate.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/001_basic.pl b/src/bin/pg_dump/t/001_basic.pl index 8c63d31cb6..60f0e1de45 100644 --- a/src/bin/pg_dump/t/001_basic.pl +++ b/src/bin/pg_dump/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index 6ad8310287..7935d1d3e5 100644 --- a/src/bin/pg_dump/t/002_pg_dump.pl +++ b/src/bin/pg_dump/t/002_pg_dump.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/003_pg_dump_with_server.pl b/src/bin/pg_dump/t/003_pg_dump_with_server.pl index ab025c44a4..e21de45ba2 100644 --- a/src/bin/pg_dump/t/003_pg_dump_with_server.pl +++ b/src/bin/pg_dump/t/003_pg_dump_with_server.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/004_pg_dump_parallel.pl b/src/bin/pg_dump/t/004_pg_dump_parallel.pl index c4b461ed87..c14391f58b 100644 --- a/src/bin/pg_dump/t/004_pg_dump_parallel.pl +++ b/src/bin/pg_dump/t/004_pg_dump_parallel.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/010_dump_connstr.pl b/src/bin/pg_dump/t/010_dump_connstr.pl index ed86c332ef..f03e1e08cc 100644 --- a/src/bin/pg_dump/t/010_dump_connstr.pl +++ b/src/bin/pg_dump/t/010_dump_connstr.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_resetwal/t/001_basic.pl b/src/bin/pg_resetwal/t/001_basic.pl index 7e5efbf56b..5c2c5908e9 100644 --- a/src/bin/pg_resetwal/t/001_basic.pl +++ b/src/bin/pg_resetwal/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_resetwal/t/002_corrupted.pl b/src/bin/pg_resetwal/t/002_corrupted.pl index 6d19a1efd5..7cc42d70eb 100644 --- a/src/bin/pg_resetwal/t/002_corrupted.pl +++ b/src/bin/pg_resetwal/t/002_corrupted.pl @@ -4,7 +4,7 @@ # Tests for handling a corrupted pg_control use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index c7b48255a7..842f6c7fbe 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl index 0d480aedb4..313b2486e1 100644 --- a/src/bin/pg_rewind/t/002_databases.pl +++ b/src/bin/pg_rewind/t/002_databases.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index fd2bee5d20..6e040239c4 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -4,7 +4,7 @@ # Test how pg_rewind reacts to extra files and directories in the data dirs. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl index 5fb7fa9077..7d1bb65cae 100644 --- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl +++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl @@ -5,7 +5,7 @@ # Test pg_rewind when the target's pg_wal directory is a symlink. # use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; use File::Path qw(rmtree); use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_rewind/t/005_same_timeline.pl b/src/bin/pg_rewind/t/005_same_timeline.pl index b4ef05e560..57e04b0ce2 100644 --- a/src/bin/pg_rewind/t/005_same_timeline.pl +++ b/src/bin/pg_rewind/t/005_same_timeline.pl @@ -6,7 +6,7 @@ # on the same timeline runs successfully. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/006_options.pl b/src/bin/pg_rewind/t/006_options.pl index 4b6e39a47c..c346b370a6 100644 --- a/src/bin/pg_rewind/t/006_options.pl +++ b/src/bin/pg_rewind/t/006_options.pl @@ -5,7 +5,7 @@ # Test checking options of pg_rewind. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/007_standby_source.pl b/src/bin/pg_rewind/t/007_standby_source.pl index 4fd1ed001c..fab84a4bbb 100644 --- a/src/bin/pg_rewind/t/007_standby_source.pl +++ b/src/bin/pg_rewind/t/007_standby_source.pl @@ -25,7 +25,7 @@ # as is. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/008_min_recovery_point.pl b/src/bin/pg_rewind/t/008_min_recovery_point.pl index d4c89451e6..287e4555b5 100644 --- a/src/bin/pg_rewind/t/008_min_recovery_point.pl +++ b/src/bin/pg_rewind/t/008_min_recovery_point.pl @@ -31,7 +31,7 @@ # nodes. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl index cf60a04ae7..016f7736e7 100644 --- a/src/bin/pg_rewind/t/009_growing_files.pl +++ b/src/bin/pg_rewind/t/009_growing_files.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 8fbbd521cb..23144f19e8 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -32,7 +32,7 @@ package RewindTest; # to run psql against the primary and standby servers, respectively. use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Exporter 'import'; diff --git a/src/bin/pg_test_fsync/t/001_basic.pl b/src/bin/pg_test_fsync/t/001_basic.pl index 401ad2c07c..135e68b9ba 100644 --- a/src/bin/pg_test_fsync/t/001_basic.pl +++ b/src/bin/pg_test_fsync/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_test_timing/t/001_basic.pl b/src/bin/pg_test_timing/t/001_basic.pl index 43bc68cb37..628a603f85 100644 --- a/src/bin/pg_test_timing/t/001_basic.pl +++ b/src/bin/pg_test_timing/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_upgrade/t/001_basic.pl b/src/bin/pg_upgrade/t/001_basic.pl index ceac4e0851..6f7117cec6 100644 --- a/src/bin/pg_upgrade/t/001_basic.pl +++ b/src/bin/pg_upgrade/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl index a5688a1cf2..a484064b54 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -2,7 +2,7 @@ # Set of tests for pg_upgrade, including cross-version checks. use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(abs_path); use File::Basename qw(dirname); diff --git a/src/bin/pg_verifybackup/t/001_basic.pl b/src/bin/pg_verifybackup/t/001_basic.pl index 73e8663238..f1127c827a 100644 --- a/src/bin/pg_verifybackup/t/001_basic.pl +++ b/src/bin/pg_verifybackup/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/002_algorithm.pl b/src/bin/pg_verifybackup/t/002_algorithm.pl index 5b02ea4d55..c9f0c10f83 100644 --- a/src/bin/pg_verifybackup/t/002_algorithm.pl +++ b/src/bin/pg_verifybackup/t/002_algorithm.pl @@ -4,7 +4,7 @@ # Verify that we can take and verify backups with various checksum types. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl index 4cc3dd05e3..273a6ff77b 100644 --- a/src/bin/pg_verifybackup/t/003_corruption.pl +++ b/src/bin/pg_verifybackup/t/003_corruption.pl @@ -4,7 +4,7 @@ # Verify that various forms of corruption are detected by pg_verifybackup. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/004_options.pl b/src/bin/pg_verifybackup/t/004_options.pl index 2aa8352f00..f6b092b58a 100644 --- a/src/bin/pg_verifybackup/t/004_options.pl +++ b/src/bin/pg_verifybackup/t/004_options.pl @@ -4,7 +4,7 @@ # Verify the behavior of assorted pg_verifybackup options. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/005_bad_manifest.pl b/src/bin/pg_verifybackup/t/005_bad_manifest.pl index c94fdd5df8..d481ea1f02 100644 --- a/src/bin/pg_verifybackup/t/005_bad_manifest.pl +++ b/src/bin/pg_verifybackup/t/005_bad_manifest.pl @@ -5,7 +5,7 @@ # problems. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/006_encoding.pl b/src/bin/pg_verifybackup/t/006_encoding.pl index 0b37bda20c..3831a28272 100644 --- a/src/bin/pg_verifybackup/t/006_encoding.pl +++ b/src/bin/pg_verifybackup/t/006_encoding.pl @@ -4,7 +4,7 @@ # Verify that pg_verifybackup handles hex-encoded filenames correctly. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/007_wal.pl b/src/bin/pg_verifybackup/t/007_wal.pl index 89f96f85db..ea3d60b242 100644 --- a/src/bin/pg_verifybackup/t/007_wal.pl +++ b/src/bin/pg_verifybackup/t/007_wal.pl @@ -4,7 +4,7 @@ # Test pg_verifybackup's WAL verification. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/008_untar.pl b/src/bin/pg_verifybackup/t/008_untar.pl index 1a783d1188..7f0f2245f6 100644 --- a/src/bin/pg_verifybackup/t/008_untar.pl +++ b/src/bin/pg_verifybackup/t/008_untar.pl @@ -6,7 +6,7 @@ # format. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/009_extract.pl b/src/bin/pg_verifybackup/t/009_extract.pl index f4d5378555..e8e4f60768 100644 --- a/src/bin/pg_verifybackup/t/009_extract.pl +++ b/src/bin/pg_verifybackup/t/009_extract.pl @@ -5,7 +5,7 @@ # a backup which was compressed by the server. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/010_client_untar.pl b/src/bin/pg_verifybackup/t/010_client_untar.pl index 44d83e777f..64907f0cae 100644 --- a/src/bin/pg_verifybackup/t/010_client_untar.pl +++ b/src/bin/pg_verifybackup/t/010_client_untar.pl @@ -5,7 +5,7 @@ # backup that didn't start out in plain format. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_waldump/t/001_basic.pl b/src/bin/pg_waldump/t/001_basic.pl index 029a0d0521..b805283385 100644 --- a/src/bin/pg_waldump/t/001_basic.pl +++ b/src/bin/pg_waldump/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_waldump/t/002_save_fullpage.pl b/src/bin/pg_waldump/t/002_save_fullpage.pl index f0725805f2..ed6726c486 100644 --- a/src/bin/pg_waldump/t/002_save_fullpage.pl +++ b/src/bin/pg_waldump/t/002_save_fullpage.pl @@ -2,7 +2,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::RecursiveCopy; diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index 142f966300..3f4d2fec7c 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pgbench/t/002_pgbench_no_server.pl b/src/bin/pgbench/t/002_pgbench_no_server.pl index 0ec54fbb03..1596b256dd 100644 --- a/src/bin/pgbench/t/002_pgbench_no_server.pl +++ b/src/bin/pgbench/t/002_pgbench_no_server.pl @@ -6,7 +6,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index 0809db4151..def02465d5 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -20,7 +20,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $docdir = ''; diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl index 9ac27db212..b7bc73a197 100644 --- a/src/bin/psql/t/001_basic.pl +++ b/src/bin/psql/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use locale; use PostgreSQL::Test::Cluster; diff --git a/src/bin/psql/t/010_tab_completion.pl b/src/bin/psql/t/010_tab_completion.pl index 4cd0fa4680..44fdd056fa 100644 --- a/src/bin/psql/t/010_tab_completion.pl +++ b/src/bin/psql/t/010_tab_completion.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/psql/t/020_cancel.pl b/src/bin/psql/t/020_cancel.pl index 0765d82b92..7b51b77075 100644 --- a/src/bin/psql/t/020_cancel.pl +++ b/src/bin/psql/t/020_cancel.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl index 715207fb4d..60792c2eea 100644 --- a/src/bin/scripts/t/010_clusterdb.pl +++ b/src/bin/scripts/t/010_clusterdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/011_clusterdb_all.pl b/src/bin/scripts/t/011_clusterdb_all.pl index 35f0b18f50..26315d0a51 100644 --- a/src/bin/scripts/t/011_clusterdb_all.pl +++ b/src/bin/scripts/t/011_clusterdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl index 40291924e5..8815477672 100644 --- a/src/bin/scripts/t/020_createdb.pl +++ b/src/bin/scripts/t/020_createdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/040_createuser.pl b/src/bin/scripts/t/040_createuser.pl index 3290e30c88..75dd7331ba 100644 --- a/src/bin/scripts/t/040_createuser.pl +++ b/src/bin/scripts/t/040_createuser.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl index 3ed670bb0a..e5acab9a38 100644 --- a/src/bin/scripts/t/050_dropdb.pl +++ b/src/bin/scripts/t/050_dropdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/070_dropuser.pl b/src/bin/scripts/t/070_dropuser.pl index 95c24c4f30..74947e8ca7 100644 --- a/src/bin/scripts/t/070_dropuser.pl +++ b/src/bin/scripts/t/070_dropuser.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/080_pg_isready.pl b/src/bin/scripts/t/080_pg_isready.pl index 8f53aef573..9784006465 100644 --- a/src/bin/scripts/t/080_pg_isready.pl +++ b/src/bin/scripts/t/080_pg_isready.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/090_reindexdb.pl b/src/bin/scripts/t/090_reindexdb.pl index b663d0e741..7ed71849c3 100644 --- a/src/bin/scripts/t/090_reindexdb.pl +++ b/src/bin/scripts/t/090_reindexdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/091_reindexdb_all.pl b/src/bin/scripts/t/091_reindexdb_all.pl index 7f3e081ceb..fdb198b4e7 100644 --- a/src/bin/scripts/t/091_reindexdb_all.pl +++ b/src/bin/scripts/t/091_reindexdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl index eccfcc54a1..17f911efa2 100644 --- a/src/bin/scripts/t/100_vacuumdb.pl +++ b/src/bin/scripts/t/100_vacuumdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/101_vacuumdb_all.pl b/src/bin/scripts/t/101_vacuumdb_all.pl index 8d7c3ab014..673a94d005 100644 --- a/src/bin/scripts/t/101_vacuumdb_all.pl +++ b/src/bin/scripts/t/101_vacuumdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/102_vacuumdb_stages.pl b/src/bin/scripts/t/102_vacuumdb_stages.pl index 64d7ed1575..c1174fd5e8 100644 --- a/src/bin/scripts/t/102_vacuumdb_stages.pl +++ b/src/bin/scripts/t/102_vacuumdb_stages.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/200_connstr.pl b/src/bin/scripts/t/200_connstr.pl index 53c5e21ab2..4f3d9ffe98 100644 --- a/src/bin/scripts/t/200_connstr.pl +++ b/src/bin/scripts/t/200_connstr.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/common/unicode/generate-norm_test_table.pl b/src/common/unicode/generate-norm_test_table.pl index 3434f7e263..fb1718047f 100644 --- a/src/common/unicode/generate-norm_test_table.pl +++ b/src/common/unicode/generate-norm_test_table.pl @@ -8,7 +8,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; diff --git a/src/common/unicode/generate-unicode_east_asian_fw_table.pl b/src/common/unicode/generate-unicode_east_asian_fw_table.pl index 2b2df375ed..6037fdae2c 100644 --- a/src/common/unicode/generate-unicode_east_asian_fw_table.pl +++ b/src/common/unicode/generate-unicode_east_asian_fw_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $range_start = undef; my ($first, $last); diff --git a/src/common/unicode/generate-unicode_nonspacing_table.pl b/src/common/unicode/generate-unicode_nonspacing_table.pl index ae86e82922..521b939943 100644 --- a/src/common/unicode/generate-unicode_nonspacing_table.pl +++ b/src/common/unicode/generate-unicode_nonspacing_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $range_start = undef; my $codepoint; diff --git a/src/common/unicode/generate-unicode_norm_table.pl b/src/common/unicode/generate-unicode_norm_table.pl index d5914118ab..65b001d065 100644 --- a/src/common/unicode/generate-unicode_norm_table.pl +++ b/src/common/unicode/generate-unicode_norm_table.pl @@ -9,7 +9,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/common/unicode/generate-unicode_normprops_table.pl b/src/common/unicode/generate-unicode_normprops_table.pl index 1b7473180b..f831c2d0d5 100644 --- a/src/common/unicode/generate-unicode_normprops_table.pl +++ b/src/common/unicode/generate-unicode_normprops_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2020-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/../../tools/"; diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids index eb5c3fb084..1830b95b0a 100755 --- a/src/include/catalog/duplicate_oids +++ b/src/include/catalog/duplicate_oids @@ -17,7 +17,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Must run in src/include/catalog use FindBin; diff --git a/src/include/catalog/reformat_dat_file.pl b/src/include/catalog/reformat_dat_file.pl index 725117d846..b5235c24d3 100755 --- a/src/include/catalog/reformat_dat_file.pl +++ b/src/include/catalog/reformat_dat_file.pl @@ -18,7 +18,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use Getopt::Long; diff --git a/src/include/catalog/renumber_oids.pl b/src/include/catalog/renumber_oids.pl index ec09584959..a418b33d58 100755 --- a/src/include/catalog/renumber_oids.pl +++ b/src/include/catalog/renumber_oids.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use Getopt::Long; diff --git a/src/include/catalog/unused_oids b/src/include/catalog/unused_oids index ccf3c3f781..f5f0c57b74 100755 --- a/src/include/catalog/unused_oids +++ b/src/include/catalog/unused_oids @@ -19,7 +19,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Must run in src/include/catalog use FindBin; diff --git a/src/interfaces/ecpg/preproc/check_rules.pl b/src/interfaces/ecpg/preproc/check_rules.pl index 5e823fa30e..6417ee7315 100644 --- a/src/interfaces/ecpg/preproc/check_rules.pl +++ b/src/interfaces/ecpg/preproc/check_rules.pl @@ -17,7 +17,7 @@ # Then it checks to make sure each rule in ecpg.addons was found in gram.y use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $srcdir = '.'; diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl index 7574fc3110..b0caeb356f 100644 --- a/src/interfaces/ecpg/preproc/parse.pl +++ b/src/interfaces/ecpg/preproc/parse.pl @@ -13,7 +13,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $srcdir = '.'; diff --git a/src/interfaces/libpq/t/001_uri.pl b/src/interfaces/libpq/t/001_uri.pl index fd062a95c5..cd876e758f 100644 --- a/src/interfaces/libpq/t/001_uri.pl +++ b/src/interfaces/libpq/t/001_uri.pl @@ -1,6 +1,6 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/interfaces/libpq/t/002_api.pl b/src/interfaces/libpq/t/002_api.pl index 8b43a984fb..9d376bcaa2 100644 --- a/src/interfaces/libpq/t/002_api.pl +++ b/src/interfaces/libpq/t/002_api.pl @@ -1,6 +1,6 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/interfaces/libpq/t/003_load_balance_host_list.pl b/src/interfaces/libpq/t/003_load_balance_host_list.pl index 21c3b8dd33..c6fe049fe5 100644 --- a/src/interfaces/libpq/t/003_load_balance_host_list.pl +++ b/src/interfaces/libpq/t/003_load_balance_host_list.pl @@ -1,6 +1,6 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/interfaces/libpq/t/004_load_balance_dns.pl b/src/interfaces/libpq/t/004_load_balance_dns.pl index 875070e212..81cf628ac7 100644 --- a/src/interfaces/libpq/t/004_load_balance_dns.pl +++ b/src/interfaces/libpq/t/004_load_balance_dns.pl @@ -1,6 +1,6 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/pl/plperl/plc_perlboot.pl b/src/pl/plperl/plc_perlboot.pl index 13298013d3..90c1b7e667 100644 --- a/src/pl/plperl/plc_perlboot.pl +++ b/src/pl/plperl/plc_perlboot.pl @@ -4,7 +4,7 @@ # src/pl/plperl/plc_perlboot.pl use strict; -use warnings; +use warnings FATAL => 'all'; use vars qw(%_SHARED $_TD); @@ -58,7 +58,7 @@ sub ::encode_array_constructor package PostgreSQL::InServer; ## no critic (RequireFilenameMatchesPackage) #>>> use strict; - use warnings; + use warnings FATAL => 'all'; sub plperl_warn { @@ -107,7 +107,7 @@ sub ::encode_array_constructor package PostgreSQL::InServer::ARRAY; use strict; - use warnings; + use warnings FATAL => 'all'; use overload '""' => \&to_str, diff --git a/src/pl/plperl/plperl_opmask.pl b/src/pl/plperl/plperl_opmask.pl index 26ac717770..09dc72d273 100644 --- a/src/pl/plperl/plperl_opmask.pl +++ b/src/pl/plperl/plperl_opmask.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Opcode qw(opset opset_to_ops opdesc); diff --git a/src/pl/plperl/text2macro.pl b/src/pl/plperl/text2macro.pl index 933632c0df..7a41da84c6 100644 --- a/src/pl/plperl/text2macro.pl +++ b/src/pl/plperl/text2macro.pl @@ -27,7 +27,7 @@ =head1 DESCRIPTION =cut use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; diff --git a/src/pl/plpgsql/src/generate-plerrcodes.pl b/src/pl/plpgsql/src/generate-plerrcodes.pl index f4fd376ef9..03ce58b94e 100644 --- a/src/pl/plpgsql/src/generate-plerrcodes.pl +++ b/src/pl/plpgsql/src/generate-plerrcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/pl/plpython/generate-spiexceptions.pl b/src/pl/plpython/generate-spiexceptions.pl index 61b37c3541..090e20472c 100644 --- a/src/pl/plpython/generate-spiexceptions.pl +++ b/src/pl/plpython/generate-spiexceptions.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/pl/tcl/generate-pltclerrcodes.pl b/src/pl/tcl/generate-pltclerrcodes.pl index 9c2309108c..df1ba7d4d4 100644 --- a/src/pl/tcl/generate-pltclerrcodes.pl +++ b/src/pl/tcl/generate-pltclerrcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 12552837a8..56b3cd0ab7 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -9,7 +9,7 @@ # This test can only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl index ef15831166..c3a73dfda1 100644 --- a/src/test/authentication/t/002_saslprep.pl +++ b/src/test/authentication/t/002_saslprep.pl @@ -6,7 +6,7 @@ # This test can only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/003_peer.pl b/src/test/authentication/t/003_peer.pl index eacff2b52a..96217b6661 100644 --- a/src/test/authentication/t/003_peer.pl +++ b/src/test/authentication/t/003_peer.pl @@ -6,7 +6,7 @@ # and is only able to run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/004_file_inclusion.pl b/src/test/authentication/t/004_file_inclusion.pl index 55d28ad586..364bba81ca 100644 --- a/src/test/authentication/t/004_file_inclusion.pl +++ b/src/test/authentication/t/004_file_inclusion.pl @@ -5,7 +5,7 @@ # only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use File::Basename qw(basename); diff --git a/src/test/authentication/t/005_sspi.pl b/src/test/authentication/t/005_sspi.pl index 37fd5bc243..bdc829dcf8 100644 --- a/src/test/authentication/t/005_sspi.pl +++ b/src/test/authentication/t/005_sspi.pl @@ -4,7 +4,7 @@ # Tests targeting SSPI on Windows. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/icu/t/010_database.pl b/src/test/icu/t/010_database.pl index 0e9446cebe..083c6f26e2 100644 --- a/src/test/icu/t/010_database.pl +++ b/src/test/icu/t/010_database.pl @@ -1,7 +1,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl index 0deb9bffc8..e9ceb712f5 100644 --- a/src/test/kerberos/t/001_auth.pl +++ b/src/test/kerberos/t/001_auth.pl @@ -18,7 +18,7 @@ # See the README for additional information. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/ldap/LdapServer.pm b/src/test/ldap/LdapServer.pm index a4c1a1843c..f63844d60a 100644 --- a/src/test/ldap/LdapServer.pm +++ b/src/test/ldap/LdapServer.pm @@ -46,7 +46,7 @@ LdapServer - class for an LDAP server for testing pg_hba.conf authentication package LdapServer; use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 3e113fd6eb..5e569c4db9 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/.."; diff --git a/src/test/ldap/t/002_bindpasswd.pl b/src/test/ldap/t/002_bindpasswd.pl index bcd4aa2b74..204ed39059 100644 --- a/src/test/ldap/t/002_bindpasswd.pl +++ b/src/test/ldap/t/002_bindpasswd.pl @@ -2,7 +2,7 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/.."; diff --git a/src/test/locale/sort-test.pl b/src/test/locale/sort-test.pl index 8bed29b3ad..47efa8f8bb 100755 --- a/src/test/locale/sort-test.pl +++ b/src/test/locale/sort-test.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use locale; open(my $in_fh, '<', $ARGV[0]) || die; diff --git a/src/test/modules/brin/t/01_workitems.pl b/src/test/modules/brin/t/01_workitems.pl index 5f71074231..376c3a43f1 100644 --- a/src/test/modules/brin/t/01_workitems.pl +++ b/src/test/modules/brin/t/01_workitems.pl @@ -4,7 +4,7 @@ # Verify that work items work correctly use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/brin/t/02_wal_consistency.pl b/src/test/modules/brin/t/02_wal_consistency.pl index 8b2b244feb..a588a28669 100644 --- a/src/test/modules/brin/t/02_wal_consistency.pl +++ b/src/test/modules/brin/t/02_wal_consistency.pl @@ -3,7 +3,7 @@ # Verify WAL consistency use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/001_base.pl b/src/test/modules/commit_ts/t/001_base.pl index ae3fc5f52d..d6ea0c4c69 100644 --- a/src/test/modules/commit_ts/t/001_base.pl +++ b/src/test/modules/commit_ts/t/001_base.pl @@ -4,7 +4,7 @@ # Single-node test: value can be set, and is still present after recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl index 59cc2b1244..e843578ddb 100644 --- a/src/test/modules/commit_ts/t/002_standby.pl +++ b/src/test/modules/commit_ts/t/002_standby.pl @@ -4,7 +4,7 @@ # Test simple scenario involving a standby use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; 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 5af511e369..b38c3c0f26 100644 --- a/src/test/modules/commit_ts/t/003_standby_2.pl +++ b/src/test/modules/commit_ts/t/003_standby_2.pl @@ -4,7 +4,7 @@ # Test primary/standby scenario where the track_commit_timestamp GUC is # repeatedly toggled on and off. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/004_restart.pl b/src/test/modules/commit_ts/t/004_restart.pl index 8fe4bedb14..399268ebee 100644 --- a/src/test/modules/commit_ts/t/004_restart.pl +++ b/src/test/modules/commit_ts/t/004_restart.pl @@ -3,7 +3,7 @@ # Testing of commit timestamps preservation across restarts use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl index c96c8d7a4d..b7ac65091a 100644 --- a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl +++ b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl @@ -2,7 +2,7 @@ # Copyright (c) 2022, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; use FindBin; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index 056fa5c6d2..71a11ddf25 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl index 2b2c144ee2..c63e7bd394 100644 --- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl +++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; diff --git a/src/test/modules/test_custom_rmgrs/t/001_basic.pl b/src/test/modules/test_custom_rmgrs/t/001_basic.pl index 50655d3788..dc3d830299 100644 --- a/src/test/modules/test_custom_rmgrs/t/001_basic.pl +++ b/src/test/modules/test_custom_rmgrs/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/test_misc/t/001_constraint_validation.pl b/src/test/modules/test_misc/t/001_constraint_validation.pl index 5a07a5d36d..4d0ea0c59d 100644 --- a/src/test/modules/test_misc/t/001_constraint_validation.pl +++ b/src/test/modules/test_misc/t/001_constraint_validation.pl @@ -4,7 +4,7 @@ # Verify that ALTER TABLE optimizes certain operations as expected use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/002_tablespace.pl b/src/test/modules/test_misc/t/002_tablespace.pl index f774a021a8..220e2b073d 100644 --- a/src/test/modules/test_misc/t/002_tablespace.pl +++ b/src/test/modules/test_misc/t/002_tablespace.pl @@ -3,7 +3,7 @@ # regression tests. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/003_check_guc.pl b/src/test/modules/test_misc/t/003_check_guc.pl index 4fd6d03b9e..5dab498c22 100644 --- a/src/test/modules/test_misc/t/003_check_guc.pl +++ b/src/test/modules/test_misc/t/003_check_guc.pl @@ -2,7 +2,7 @@ # postgresql.conf.sample. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/004_io_direct.pl b/src/test/modules/test_misc/t/004_io_direct.pl index dddcfb1aa9..e3f0966b8d 100644 --- a/src/test/modules/test_misc/t/004_io_direct.pl +++ b/src/test/modules/test_misc/t/004_io_direct.pl @@ -1,7 +1,7 @@ # Very simple exercise of direct I/O GUC. use strict; -use warnings; +use warnings FATAL => 'all'; use Fcntl; use IO::File; use PostgreSQL::Test::Cluster; 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 d00c3544e9..bf7f92d13f 100644 --- a/src/test/modules/test_pg_dump/t/001_base.pl +++ b/src/test/modules/test_pg_dump/t/001_base.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/worker_spi/t/001_worker_spi.pl b/src/test/modules/worker_spi/t/001_worker_spi.pl index 2965acd789..312359dd4b 100644 --- a/src/test/modules/worker_spi/t/001_worker_spi.pl +++ b/src/test/modules/worker_spi/t/001_worker_spi.pl @@ -3,7 +3,7 @@ # Test worker_spi module. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index e34dfb9243..1b1078f8c6 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -30,7 +30,7 @@ compare the results of cross-version upgrade tests. package PostgreSQL::Test::AdjustUpgrade; use strict; -use warnings; +use warnings FATAL => 'all'; use Exporter 'import'; use PostgreSQL::Version; diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm index 924b57ab21..bd41c8bd10 100644 --- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm +++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm @@ -54,7 +54,7 @@ initiated by PostgreSQL::Test::Cluster. package PostgreSQL::Test::BackgroundPsql; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 5e161dbee6..3fa679ff97 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -97,7 +97,7 @@ The IPC::Run module is required. package PostgreSQL::Test::Cluster; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm b/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm index 15964e6217..1c79bfabd1 100644 --- a/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm +++ b/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm @@ -19,7 +19,7 @@ PostgreSQL::Test::RecursiveCopy::copypath($from, $to); package PostgreSQL::Test::RecursiveCopy; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use File::Basename; diff --git a/src/test/perl/PostgreSQL/Test/SimpleTee.pm b/src/test/perl/PostgreSQL/Test/SimpleTee.pm index 82099bf503..9258b7c4cd 100644 --- a/src/test/perl/PostgreSQL/Test/SimpleTee.pm +++ b/src/test/perl/PostgreSQL/Test/SimpleTee.pm @@ -17,7 +17,7 @@ package PostgreSQL::Test::SimpleTee; use strict; -use warnings; +use warnings FATAL => 'all'; use Time::HiRes qw(time); diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index 617caa022f..ca13574966 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -42,7 +42,7 @@ aimed at controlling command execution, logging and test functions. package PostgreSQL::Test::Utils; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Version.pm b/src/test/perl/PostgreSQL/Version.pm index 3705c1bdaf..dadc90fecc 100644 --- a/src/test/perl/PostgreSQL/Version.pm +++ b/src/test/perl/PostgreSQL/Version.pm @@ -45,7 +45,7 @@ of common version formats and comparison operations. package PostgreSQL::Version; use strict; -use warnings; +use warnings FATAL => 'all'; use Scalar::Util qw(blessed); diff --git a/src/test/perl/README b/src/test/perl/README index 8fb44184b9..af037a8091 100644 --- a/src/test/perl/README +++ b/src/test/perl/README @@ -58,7 +58,7 @@ order. Each test script should begin with: use strict; - use warnings; + use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl index 0c72ba0944..3526f2d554 100644 --- a/src/test/recovery/t/001_stream_rep.pl +++ b/src/test/recovery/t/001_stream_rep.pl @@ -3,7 +3,7 @@ # Minimal test testing streaming replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl index 48e00f9e29..c4d0a2a81f 100644 --- a/src/test/recovery/t/002_archiving.pl +++ b/src/test/recovery/t/002_archiving.pl @@ -3,7 +3,7 @@ # test for archiving with hot standby use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl index e882ce2077..1b63116ceb 100644 --- a/src/test/recovery/t/003_recovery_targets.pl +++ b/src/test/recovery/t/003_recovery_targets.pl @@ -3,7 +3,7 @@ # Test for recovery targets: name, timestamp, XID use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/004_timeline_switch.pl b/src/test/recovery/t/004_timeline_switch.pl index edaef91845..2500201b99 100644 --- a/src/test/recovery/t/004_timeline_switch.pl +++ b/src/test/recovery/t/004_timeline_switch.pl @@ -3,7 +3,7 @@ # Test for timeline switch use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl index 8fadca4204..2f7a99e687 100644 --- a/src/test/recovery/t/005_replay_delay.pl +++ b/src/test/recovery/t/005_replay_delay.pl @@ -3,7 +3,7 @@ # Checks for recovery_min_apply_delay and recovery pause use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl index 5025d65b1b..928093627e 100644 --- a/src/test/recovery/t/006_logical_decoding.pl +++ b/src/test/recovery/t/006_logical_decoding.pl @@ -7,7 +7,7 @@ # is for work that doesn't fit well there, like where server restarts # are required. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/007_sync_rep.pl b/src/test/recovery/t/007_sync_rep.pl index 2026af0702..b25ae1e8ec 100644 --- a/src/test/recovery/t/007_sync_rep.pl +++ b/src/test/recovery/t/007_sync_rep.pl @@ -3,7 +3,7 @@ # Minimal test testing synchronous replication sync_state transition use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl index acac0a0a55..10d1535a93 100644 --- a/src/test/recovery/t/008_fsm_truncation.pl +++ b/src/test/recovery/t/008_fsm_truncation.pl @@ -6,7 +6,7 @@ # FSM changes don't normally need to be WAL-logged, except for truncation. # The FSM mustn't return a page that doesn't exist (anymore). use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl index e1273fd0f1..cde6e2a944 100644 --- a/src/test/recovery/t/009_twophase.pl +++ b/src/test/recovery/t/009_twophase.pl @@ -3,7 +3,7 @@ # Tests dedicated to two-phase commit in recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl index 6fbbeedde3..2359821b28 100644 --- a/src/test/recovery/t/010_logical_decoding_timelines.pl +++ b/src/test/recovery/t/010_logical_decoding_timelines.pl @@ -22,7 +22,7 @@ # on logical slots). # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl index 91ae79dd51..32434d4340 100644 --- a/src/test/recovery/t/012_subtransactions.pl +++ b/src/test/recovery/t/012_subtransactions.pl @@ -3,7 +3,7 @@ # Tests dedicated to subtransactions in recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/013_crash_restart.pl b/src/test/recovery/t/013_crash_restart.pl index ce57792f31..0dfd197df4 100644 --- a/src/test/recovery/t/013_crash_restart.pl +++ b/src/test/recovery/t/013_crash_restart.pl @@ -12,7 +12,7 @@ # backend died), or because it's already restarted. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/014_unlogged_reinit.pl b/src/test/recovery/t/014_unlogged_reinit.pl index 3591b3309e..bee8b8804f 100644 --- a/src/test/recovery/t/014_unlogged_reinit.pl +++ b/src/test/recovery/t/014_unlogged_reinit.pl @@ -7,7 +7,7 @@ # that is not tested here. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/015_promotion_pages.pl b/src/test/recovery/t/015_promotion_pages.pl index beeb9dfddf..b49dd4c835 100644 --- a/src/test/recovery/t/015_promotion_pages.pl +++ b/src/test/recovery/t/015_promotion_pages.pl @@ -6,7 +6,7 @@ # invalid page references at replay based on the minimum consistent # recovery point defined. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/016_min_consistency.pl b/src/test/recovery/t/016_min_consistency.pl index 81f7a43c07..cabdd3156e 100644 --- a/src/test/recovery/t/016_min_consistency.pl +++ b/src/test/recovery/t/016_min_consistency.pl @@ -8,7 +8,7 @@ # both checked. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/017_shm.pl b/src/test/recovery/t/017_shm.pl index 74359e0e38..7935ce63d3 100644 --- a/src/test/recovery/t/017_shm.pl +++ b/src/test/recovery/t/017_shm.pl @@ -5,7 +5,7 @@ # Tests of pg_shmem.h functions # use strict; -use warnings; +use warnings FATAL => 'all'; use File::stat qw(stat); use IPC::Run 'run'; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/018_wal_optimize.pl b/src/test/recovery/t/018_wal_optimize.pl index 1d613eaede..0752bff174 100644 --- a/src/test/recovery/t/018_wal_optimize.pl +++ b/src/test/recovery/t/018_wal_optimize.pl @@ -10,7 +10,7 @@ # For many years, individual commands made the decision to skip WAL, hence the # frequent appearance of COPY in these tests. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl index 33e50ad933..c0b71934cf 100644 --- a/src/test/recovery/t/019_replslot_limit.pl +++ b/src/test/recovery/t/019_replslot_limit.pl @@ -5,7 +5,7 @@ # Ensure that max_slot_wal_keep_size limits the number of WAL files to # be kept by replication slots. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/020_archive_status.pl b/src/test/recovery/t/020_archive_status.pl index fa24153d4b..ce51bfb58e 100644 --- a/src/test/recovery/t/020_archive_status.pl +++ b/src/test/recovery/t/020_archive_status.pl @@ -5,7 +5,7 @@ # Tests related to WAL archiving and recovery. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/021_row_visibility.pl b/src/test/recovery/t/021_row_visibility.pl index 52a6a3509c..3bdd42c25d 100644 --- a/src/test/recovery/t/021_row_visibility.pl +++ b/src/test/recovery/t/021_row_visibility.pl @@ -4,7 +4,7 @@ # Checks that snapshots on standbys behave in a minimally reasonable # way. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/022_crash_temp_files.pl b/src/test/recovery/t/022_crash_temp_files.pl index 14fd8bfc7f..e702323a8f 100644 --- a/src/test/recovery/t/022_crash_temp_files.pl +++ b/src/test/recovery/t/022_crash_temp_files.pl @@ -3,7 +3,7 @@ # Test remove of temporary files after a crash. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/023_pitr_prepared_xact.pl b/src/test/recovery/t/023_pitr_prepared_xact.pl index a8cdf4efdd..090711ca4b 100644 --- a/src/test/recovery/t/023_pitr_prepared_xact.pl +++ b/src/test/recovery/t/023_pitr_prepared_xact.pl @@ -3,7 +3,7 @@ # Test for point-in-time recovery (PITR) with prepared transactions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/024_archive_recovery.pl b/src/test/recovery/t/024_archive_recovery.pl index d594332b18..e9ab11895f 100644 --- a/src/test/recovery/t/024_archive_recovery.pl +++ b/src/test/recovery/t/024_archive_recovery.pl @@ -3,7 +3,7 @@ # Test for archive recovery of WAL generated with wal_level=minimal use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/025_stuck_on_old_timeline.pl b/src/test/recovery/t/025_stuck_on_old_timeline.pl index 91309030df..65d8864327 100644 --- a/src/test/recovery/t/025_stuck_on_old_timeline.pl +++ b/src/test/recovery/t/025_stuck_on_old_timeline.pl @@ -7,7 +7,7 @@ # archive, so the WAL files all have to be streamed. Test that the cascading # standby can follow the new primary (promoted standby). use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/026_overwrite_contrecord.pl b/src/test/recovery/t/026_overwrite_contrecord.pl index 6807a97f26..09c7e13da9 100644 --- a/src/test/recovery/t/026_overwrite_contrecord.pl +++ b/src/test/recovery/t/026_overwrite_contrecord.pl @@ -3,7 +3,7 @@ # Tests for already-propagated WAL segments ending in incomplete WAL records. use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl index f2f4e77626..20508307b5 100644 --- a/src/test/recovery/t/027_stream_regress.pl +++ b/src/test/recovery/t/027_stream_regress.pl @@ -1,6 +1,6 @@ # Run the standard regression tests with streaming replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/028_pitr_timelines.pl b/src/test/recovery/t/028_pitr_timelines.pl index bb29a2d378..58390b6d79 100644 --- a/src/test/recovery/t/028_pitr_timelines.pl +++ b/src/test/recovery/t/028_pitr_timelines.pl @@ -27,7 +27,7 @@ # The actual checks are not sensitive to that. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/029_stats_restart.pl b/src/test/recovery/t/029_stats_restart.pl index 742bd57e28..b8c7e9cd5c 100644 --- a/src/test/recovery/t/029_stats_restart.pl +++ b/src/test/recovery/t/029_stats_restart.pl @@ -4,7 +4,7 @@ # invalid stats files, as well as restorting stats after "normal" restarts. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/030_stats_cleanup_replica.pl b/src/test/recovery/t/030_stats_cleanup_replica.pl index 51495aebcd..db451d9d1b 100644 --- a/src/test/recovery/t/030_stats_cleanup_replica.pl +++ b/src/test/recovery/t/030_stats_cleanup_replica.pl @@ -6,7 +6,7 @@ # - discard stats after immediate / crash restarts use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/031_recovery_conflict.pl b/src/test/recovery/t/031_recovery_conflict.pl index 05e83fa854..c773344f50 100644 --- a/src/test/recovery/t/031_recovery_conflict.pl +++ b/src/test/recovery/t/031_recovery_conflict.pl @@ -5,7 +5,7 @@ # pg_stat_database_conflicts are populated correctly use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/032_relfilenode_reuse.pl b/src/test/recovery/t/032_relfilenode_reuse.pl index 3bc2db1a4f..8a4cceacc2 100644 --- a/src/test/recovery/t/032_relfilenode_reuse.pl +++ b/src/test/recovery/t/032_relfilenode_reuse.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/033_replay_tsp_drops.pl b/src/test/recovery/t/033_replay_tsp_drops.pl index af97ed9f70..64c370224c 100644 --- a/src/test/recovery/t/033_replay_tsp_drops.pl +++ b/src/test/recovery/t/033_replay_tsp_drops.pl @@ -4,7 +4,7 @@ # Test replay of tablespace/database creation/drop use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/034_create_database.pl b/src/test/recovery/t/034_create_database.pl index ed562bba25..d4d7500dd5 100644 --- a/src/test/recovery/t/034_create_database.pl +++ b/src/test/recovery/t/034_create_database.pl @@ -4,7 +4,7 @@ # Test WAL replay for CREATE DATABASE .. STRATEGY WAL_LOG. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl index 480e6d6caa..1ebf50fe3e 100644 --- a/src/test/recovery/t/035_standby_logical_decoding.pl +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -4,7 +4,7 @@ # recovery conflict and standby promotion. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/036_truncated_dropped.pl b/src/test/recovery/t/036_truncated_dropped.pl index 2d5339d9d8..53194978fc 100644 --- a/src/test/recovery/t/036_truncated_dropped.pl +++ b/src/test/recovery/t/036_truncated_dropped.pl @@ -5,7 +5,7 @@ # truncated or dropped. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/recovery/t/037_invalid_database.pl b/src/test/recovery/t/037_invalid_database.pl index 29b9bb6977..a6b23c3ba7 100644 --- a/src/test/recovery/t/037_invalid_database.pl +++ b/src/test/recovery/t/037_invalid_database.pl @@ -3,7 +3,7 @@ # Test we handle interrupted DROP DATABASE correctly. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/cp_history_files b/src/test/recovery/t/cp_history_files index cfeea41e5b..5832b98ef4 100644 --- a/src/test/recovery/t/cp_history_files +++ b/src/test/recovery/t/cp_history_files @@ -2,7 +2,7 @@ use File::Copy; use strict; -use warnings; +use warnings FATAL => 'all'; die "wrong number of arguments" if @ARGV != 2; my ($source, $target) = @ARGV; diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 76442de063..860edb9ff7 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config qw ( %Config ); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; @@ -713,6 +713,8 @@ sub switch_server_cert # integer like how we do when grabbing the serial fails. if ($Config{ivsize} == 8) { + no warnings qw(portable); + $serialno =~ s/^serial=//; $serialno =~ s/\s+//g; $serialno = hex($serialno); diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index 27abd02abf..a556c66bff 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -4,7 +4,7 @@ # Test SCRAM authentication and TLS channel binding types use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ssl/t/003_sslinfo.pl b/src/test/ssl/t/003_sslinfo.pl index 5306aad802..866fe5ad2c 100644 --- a/src/test/ssl/t/003_sslinfo.pl +++ b/src/test/ssl/t/003_sslinfo.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ssl/t/SSL/Backend/OpenSSL.pm b/src/test/ssl/t/SSL/Backend/OpenSSL.pm index a762f43634..a2b44f8516 100644 --- a/src/test/ssl/t/SSL/Backend/OpenSSL.pm +++ b/src/test/ssl/t/SSL/Backend/OpenSSL.pm @@ -25,7 +25,7 @@ for a PostgreSQL cluster compiled against OpenSSL. package SSL::Backend::OpenSSL; use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use File::Copy; diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm index 2c5c055222..836e098902 100644 --- a/src/test/ssl/t/SSL/Server.pm +++ b/src/test/ssl/t/SSL/Server.pm @@ -64,7 +64,7 @@ specific infrastructure. Currently only OpenSSL is supported. package SSL::Server; use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl index 0a399cdb82..a69a53e19c 100644 --- a/src/test/subscription/t/001_rep_changes.pl +++ b/src/test/subscription/t/001_rep_changes.pl @@ -3,7 +3,7 @@ # Basic logical replication test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/002_types.pl b/src/test/subscription/t/002_types.pl index 6b5853b80b..73f6c52977 100644 --- a/src/test/subscription/t/002_types.pl +++ b/src/test/subscription/t/002_types.pl @@ -4,7 +4,7 @@ # This tests that more complex datatypes are replicated correctly # by logical replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/003_constraints.pl b/src/test/subscription/t/003_constraints.pl index 6e902360cc..a78061b22f 100644 --- a/src/test/subscription/t/003_constraints.pl +++ b/src/test/subscription/t/003_constraints.pl @@ -3,7 +3,7 @@ # This test checks that constraints work on subscriber use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl index aa7714c533..000154b75e 100644 --- a/src/test/subscription/t/004_sync.pl +++ b/src/test/subscription/t/004_sync.pl @@ -3,7 +3,7 @@ # Tests for logical replication table syncing use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/005_encoding.pl b/src/test/subscription/t/005_encoding.pl index 2f0bf7730b..a7e88e42f7 100644 --- a/src/test/subscription/t/005_encoding.pl +++ b/src/test/subscription/t/005_encoding.pl @@ -3,7 +3,7 @@ # Test replication between databases with different encodings use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/006_rewrite.pl b/src/test/subscription/t/006_rewrite.pl index 8bc7e872d9..2a2d27f89f 100644 --- a/src/test/subscription/t/006_rewrite.pl +++ b/src/test/subscription/t/006_rewrite.pl @@ -3,7 +3,7 @@ # Test logical replication behavior with heap rewrites use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/007_ddl.pl b/src/test/subscription/t/007_ddl.pl index cbdb5b66e4..9bf69b35f7 100644 --- a/src/test/subscription/t/007_ddl.pl +++ b/src/test/subscription/t/007_ddl.pl @@ -3,7 +3,7 @@ # Test some logical replication DDL behavior use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl index c6e41b65b9..0b24cc45c2 100644 --- a/src/test/subscription/t/008_diff_schema.pl +++ b/src/test/subscription/t/008_diff_schema.pl @@ -3,7 +3,7 @@ # Test behavior with different schema on subscriber use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/009_matviews.pl b/src/test/subscription/t/009_matviews.pl index 38080b4313..36baf8bf3c 100644 --- a/src/test/subscription/t/009_matviews.pl +++ b/src/test/subscription/t/009_matviews.pl @@ -3,7 +3,7 @@ # Test materialized views behavior use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/010_truncate.pl b/src/test/subscription/t/010_truncate.pl index a5b6445392..9dc8c4d58f 100644 --- a/src/test/subscription/t/010_truncate.pl +++ b/src/test/subscription/t/010_truncate.pl @@ -3,7 +3,7 @@ # Test TRUNCATE use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/011_generated.pl b/src/test/subscription/t/011_generated.pl index 7711be295a..60b613a2ad 100644 --- a/src/test/subscription/t/011_generated.pl +++ b/src/test/subscription/t/011_generated.pl @@ -3,7 +3,7 @@ # Test generated columns use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/012_collation.pl b/src/test/subscription/t/012_collation.pl index 823550a31b..2efe201a6c 100644 --- a/src/test/subscription/t/012_collation.pl +++ b/src/test/subscription/t/012_collation.pl @@ -4,7 +4,7 @@ # Test collations, in particular nondeterministic ones # (only works with ICU) use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl index 275fb3b525..c79b89ef42 100644 --- a/src/test/subscription/t/013_partition.pl +++ b/src/test/subscription/t/013_partition.pl @@ -3,7 +3,7 @@ # Test logical replication with partitioned tables use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/014_binary.pl b/src/test/subscription/t/014_binary.pl index e5ce849c19..990dc4e9f1 100644 --- a/src/test/subscription/t/014_binary.pl +++ b/src/test/subscription/t/014_binary.pl @@ -4,7 +4,7 @@ # Binary mode logical replication test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/015_stream.pl b/src/test/subscription/t/015_stream.pl index b450a78adf..79a6d094c0 100644 --- a/src/test/subscription/t/015_stream.pl +++ b/src/test/subscription/t/015_stream.pl @@ -3,7 +3,7 @@ # Test streaming of simple large transaction use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/016_stream_subxact.pl b/src/test/subscription/t/016_stream_subxact.pl index 838049af65..ffc02fa47c 100644 --- a/src/test/subscription/t/016_stream_subxact.pl +++ b/src/test/subscription/t/016_stream_subxact.pl @@ -3,7 +3,7 @@ # Test streaming of transaction containing subtransactions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/017_stream_ddl.pl b/src/test/subscription/t/017_stream_ddl.pl index d00ede44ed..9aa41ad7b4 100644 --- a/src/test/subscription/t/017_stream_ddl.pl +++ b/src/test/subscription/t/017_stream_ddl.pl @@ -6,7 +6,7 @@ # This file is mainly to test the DDL/DML interaction of the publisher side, # so we didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/018_stream_subxact_abort.pl b/src/test/subscription/t/018_stream_subxact_abort.pl index 77c96011a9..f6c759368e 100644 --- a/src/test/subscription/t/018_stream_subxact_abort.pl +++ b/src/test/subscription/t/018_stream_subxact_abort.pl @@ -3,7 +3,7 @@ # Test streaming of transaction containing multiple subtransactions and rollbacks use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl index 6c2a9c5bf1..e9ab94ea97 100644 --- a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl +++ b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl @@ -7,7 +7,7 @@ # This file is mainly to test the DDL/DML interaction of the publisher side, # so we didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/020_messages.pl b/src/test/subscription/t/020_messages.pl index 826d39cd89..761e4399fd 100644 --- a/src/test/subscription/t/020_messages.pl +++ b/src/test/subscription/t/020_messages.pl @@ -3,7 +3,7 @@ # Tests that logical decoding messages use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl index 8ce4cfc983..d57219cb3b 100644 --- a/src/test/subscription/t/021_twophase.pl +++ b/src/test/subscription/t/021_twophase.pl @@ -3,7 +3,7 @@ # logical replication of 2PC test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/022_twophase_cascade.pl b/src/test/subscription/t/022_twophase_cascade.pl index b37ed95c9e..9adbc4d1e8 100644 --- a/src/test/subscription/t/022_twophase_cascade.pl +++ b/src/test/subscription/t/022_twophase_cascade.pl @@ -8,7 +8,7 @@ # Two-phase and parallel apply will be tested in 023_twophase_stream, so we # didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/023_twophase_stream.pl b/src/test/subscription/t/023_twophase_stream.pl index fdc9e2a0f0..9f837a9811 100644 --- a/src/test/subscription/t/023_twophase_stream.pl +++ b/src/test/subscription/t/023_twophase_stream.pl @@ -3,7 +3,7 @@ # Test logical replication of 2PC with streaming. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/024_add_drop_pub.pl b/src/test/subscription/t/024_add_drop_pub.pl index 8614b1b5b3..0528ebf2fa 100644 --- a/src/test/subscription/t/024_add_drop_pub.pl +++ b/src/test/subscription/t/024_add_drop_pub.pl @@ -3,7 +3,7 @@ # This test checks behaviour of ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/025_rep_changes_for_schema.pl b/src/test/subscription/t/025_rep_changes_for_schema.pl index 8543f52710..64ec29a4b8 100644 --- a/src/test/subscription/t/025_rep_changes_for_schema.pl +++ b/src/test/subscription/t/025_rep_changes_for_schema.pl @@ -3,7 +3,7 @@ # Logical replication tests for schema publications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/026_stats.pl b/src/test/subscription/t/026_stats.pl index 0bcda006cd..ad9cb8deff 100644 --- a/src/test/subscription/t/026_stats.pl +++ b/src/test/subscription/t/026_stats.pl @@ -3,7 +3,7 @@ # Tests for subscription stats. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/027_nosuperuser.pl b/src/test/subscription/t/027_nosuperuser.pl index d7a7e3ef5b..15b6a97721 100644 --- a/src/test/subscription/t/027_nosuperuser.pl +++ b/src/test/subscription/t/027_nosuperuser.pl @@ -3,7 +3,7 @@ # Test that logical replication respects permissions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/subscription/t/028_row_filter.pl b/src/test/subscription/t/028_row_filter.pl index aec483f785..9633e9e597 100644 --- a/src/test/subscription/t/028_row_filter.pl +++ b/src/test/subscription/t/028_row_filter.pl @@ -2,7 +2,7 @@ # Test logical replication behavior with row filtering use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/029_on_error.pl b/src/test/subscription/t/029_on_error.pl index fcab7386fe..d874e83896 100644 --- a/src/test/subscription/t/029_on_error.pl +++ b/src/test/subscription/t/029_on_error.pl @@ -3,7 +3,7 @@ # Tests for disable_on_error and SKIP transaction features. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/030_origin.pl b/src/test/subscription/t/030_origin.pl index 9ca1fa25d8..fa33f997e8 100644 --- a/src/test/subscription/t/030_origin.pl +++ b/src/test/subscription/t/030_origin.pl @@ -4,7 +4,7 @@ # Test the CREATE SUBSCRIPTION 'origin' parameter and its interaction with # 'copy_data' parameter. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl index dbff806040..35fa1e4d93 100644 --- a/src/test/subscription/t/031_column_list.pl +++ b/src/test/subscription/t/031_column_list.pl @@ -2,7 +2,7 @@ # Test partial-column publication of tables use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/032_subscribe_use_index.pl b/src/test/subscription/t/032_subscribe_use_index.pl index 880ef2d57a..f219140afa 100644 --- a/src/test/subscription/t/032_subscribe_use_index.pl +++ b/src/test/subscription/t/032_subscribe_use_index.pl @@ -2,7 +2,7 @@ # Test logical replication behavior with subscriber using available index use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/033_run_as_table_owner.pl b/src/test/subscription/t/033_run_as_table_owner.pl index 9de3c04a0c..348e183e60 100644 --- a/src/test/subscription/t/033_run_as_table_owner.pl +++ b/src/test/subscription/t/033_run_as_table_owner.pl @@ -3,7 +3,7 @@ # Test that logical replication respects permissions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/subscription/t/100_bugs.pl b/src/test/subscription/t/100_bugs.pl index 4fabc44168..63bd01d5a7 100644 --- a/src/test/subscription/t/100_bugs.pl +++ b/src/test/subscription/t/100_bugs.pl @@ -3,7 +3,7 @@ # Tests for various bugs found over time use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/tools/PerfectHash.pm b/src/tools/PerfectHash.pm index e54905a3ef..0587107962 100644 --- a/src/tools/PerfectHash.pm +++ b/src/tools/PerfectHash.pm @@ -30,7 +30,7 @@ package PerfectHash; use strict; -use warnings; +use warnings FATAL => 'all'; # At runtime, we'll compute two simple hash functions of the input key, diff --git a/src/tools/check_bison_recursion.pl b/src/tools/check_bison_recursion.pl index 18f14ad127..2f079a01a7 100755 --- a/src/tools/check_bison_recursion.pl +++ b/src/tools/check_bison_recursion.pl @@ -22,7 +22,7 @@ ################################################################# use strict; -use warnings; +use warnings FATAL => 'all'; my $debug = 0; diff --git a/src/tools/ci/windows_build_config.pl b/src/tools/ci/windows_build_config.pl index b0d4360c74..a3eb96b7fd 100644 --- a/src/tools/ci/windows_build_config.pl +++ b/src/tools/ci/windows_build_config.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; our $config; diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl index 30c38c757b..4263b5a3eb 100755 --- a/src/tools/copyright.pl +++ b/src/tools/copyright.pl @@ -10,7 +10,7 @@ ################################################################# use strict; -use warnings; +use warnings FATAL => 'all'; use File::Find; use File::Basename; diff --git a/src/tools/fix-old-flex-code.pl b/src/tools/fix-old-flex-code.pl index d88e68b8b6..c9b0517ed4 100644 --- a/src/tools/fix-old-flex-code.pl +++ b/src/tools/fix-old-flex-code.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Get command line argument. usage() if $#ARGV != 0; diff --git a/src/tools/gen_export.pl b/src/tools/gen_export.pl index ed60abe956..08f839ed07 100644 --- a/src/tools/gen_export.pl +++ b/src/tools/gen_export.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $format; diff --git a/src/tools/gen_keywordlist.pl b/src/tools/gen_keywordlist.pl index 97a9ff1b30..2ad9c9a4a3 100644 --- a/src/tools/gen_keywordlist.pl +++ b/src/tools/gen_keywordlist.pl @@ -29,7 +29,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/tools/git_changelog b/src/tools/git_changelog index 39e1b1fe15..f3c225d556 100755 --- a/src/tools/git_changelog +++ b/src/tools/git_changelog @@ -50,7 +50,7 @@ use strict; -use warnings; +use warnings FATAL => 'all'; require Time::Local; require Getopt::Long; require IPC::Open2; diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl index 45b4e73bff..a0ff7f0e2b 100755 --- a/src/tools/mark_pgdllimport.pl +++ b/src/tools/mark_pgdllimport.pl @@ -23,7 +23,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; for my $include_file (@ARGV) { diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 05548d7c0a..39cf83ab5e 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -9,7 +9,7 @@ package Install; # src/tools/msvc/Install.pm # use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use File::Basename; use File::Copy; diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 62fec1fee5..6a6fb0e230 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -11,7 +11,7 @@ package MSBuildProject; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(Project); no warnings qw(redefine); ## no critic @@ -412,7 +412,7 @@ package VC2015Project; # use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(MSBuildProject); no warnings qw(redefine); ## no critic @@ -437,7 +437,7 @@ package VC2017Project; # use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(MSBuildProject); no warnings qw(redefine); ## no critic @@ -462,7 +462,7 @@ package VC2019Project; # use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(MSBuildProject); no warnings qw(redefine); ## no critic @@ -487,7 +487,7 @@ package VC2022Project; # use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(MSBuildProject); no warnings qw(redefine); ## no critic diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 9e05eb91b1..91cdd56888 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -9,7 +9,7 @@ package Mkvcbuild; # src/tools/msvc/Mkvcbuild.pm # use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use if ($^O eq "MSWin32"), 'Win32'; diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 0507ad08c5..6e87c94b82 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -10,7 +10,7 @@ package Project; # use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; sub _new diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index a50f730260..b0866cb94f 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -10,7 +10,7 @@ package Solution; # use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use VSObjectFactory; no warnings qw(redefine); ## no critic @@ -1242,7 +1242,7 @@ package VS2015Solution; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(Solution); no warnings qw(redefine); ## no critic @@ -1270,7 +1270,7 @@ package VS2017Solution; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(Solution); no warnings qw(redefine); ## no critic @@ -1298,7 +1298,7 @@ package VS2019Solution; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(Solution); no warnings qw(redefine); ## no critic @@ -1326,7 +1326,7 @@ package VS2022Solution; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use base qw(Solution); no warnings qw(redefine); ## no critic diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index 9df2ab4282..2850ad8b3d 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -11,7 +11,7 @@ package VSObjectFactory; use Carp; use strict; -use warnings; +use warnings FATAL => 'all'; use Exporter; use Project; diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl index 9853e5c3d8..a6934ed0ff 100644 --- a/src/tools/msvc/build.pl +++ b/src/tools/msvc/build.pl @@ -8,7 +8,7 @@ # src/tools/msvc/build.pl # use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib $FindBin::RealBin; diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 8945e772c2..0b40f6e38f 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -3,7 +3,7 @@ # Configuration arguments for vcbuild. use strict; -use warnings; +use warnings FATAL => 'all'; our $config = { asserts => 0, # --enable-cassert diff --git a/src/tools/msvc/dummylib/Win32.pm b/src/tools/msvc/dummylib/Win32.pm index df2d7a2929..6c483d60a2 100644 --- a/src/tools/msvc/dummylib/Win32.pm +++ b/src/tools/msvc/dummylib/Win32.pm @@ -3,5 +3,5 @@ package Win32; use strict; -use warnings; +use warnings FATAL => 'all'; 1; diff --git a/src/tools/msvc/dummylib/Win32/Registry.pm b/src/tools/msvc/dummylib/Win32/Registry.pm index e14636eb31..0abf53cb04 100644 --- a/src/tools/msvc/dummylib/Win32/Registry.pm +++ b/src/tools/msvc/dummylib/Win32/Registry.pm @@ -4,7 +4,7 @@ package Win32::Registry; use strict; -use warnings; +use warnings FATAL => 'all'; use vars qw($HKEY_LOCAL_MACHINE); diff --git a/src/tools/msvc/dummylib/Win32API/File.pm b/src/tools/msvc/dummylib/Win32API/File.pm index 7baf34c4e5..42c066acbb 100644 --- a/src/tools/msvc/dummylib/Win32API/File.pm +++ b/src/tools/msvc/dummylib/Win32API/File.pm @@ -4,7 +4,7 @@ package Win32API::File; use strict; -use warnings; +use warnings FATAL => 'all'; use constant { SEM_FAILCRITICALERRORS => 1, SEM_NOGPFAULTERRORBOX => 2 }; sub SetErrormode { } diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl index cf83d7d056..593a8e005c 100644 --- a/src/tools/msvc/gendef.pl +++ b/src/tools/msvc/gendef.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use List::Util qw(min); use Getopt::Long; diff --git a/src/tools/msvc/install.pl b/src/tools/msvc/install.pl index 8de7cee90f..37cb8d6b43 100755 --- a/src/tools/msvc/install.pl +++ b/src/tools/msvc/install.pl @@ -7,7 +7,7 @@ # src/tools/msvc/install.pl # use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib $FindBin::RealBin; diff --git a/src/tools/msvc/mkvcbuild.pl b/src/tools/msvc/mkvcbuild.pl index 7f94b1a6c9..b2f43fafeb 100644 --- a/src/tools/msvc/mkvcbuild.pl +++ b/src/tools/msvc/mkvcbuild.pl @@ -8,7 +8,7 @@ # src/tools/msvc/mkvcbuild.pl # use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib $FindBin::RealBin; diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl index 25df6699b5..0687a5b874 100644 --- a/src/tools/msvc/pgbison.pl +++ b/src/tools/msvc/pgbison.pl @@ -5,7 +5,7 @@ # src/tools/msvc/pgbison.pl use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl index c308a08b55..59361d59c9 100644 --- a/src/tools/msvc/pgflex.pl +++ b/src/tools/msvc/pgflex.pl @@ -5,7 +5,7 @@ # src/tools/msvc/pgflex.pl use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 78170d105d..e8ea1a68dc 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -5,7 +5,7 @@ # src/tools/msvc/vcregress.pl use strict; -use warnings; +use warnings FATAL => 'all'; our $config; diff --git a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl index fef5c86ca4..fb772cb89b 100644 --- a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl +++ b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl @@ -4,7 +4,7 @@ # Copyright (c) 2017-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(getcwd); use File::Copy "cp"; diff --git a/src/tools/pginclude/pgcheckdefines b/src/tools/pginclude/pgcheckdefines index a9fe79ebe5..68aa5d178e 100755 --- a/src/tools/pginclude/pgcheckdefines +++ b/src/tools/pginclude/pgcheckdefines @@ -23,7 +23,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd; use File::Basename; diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index bce63d95da..b81fbab2ab 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(abs_path getcwd); use File::Find; diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl index 1f0074ded5..ad0f233758 100755 --- a/src/tools/version_stamp.pl +++ b/src/tools/version_stamp.pl @@ -21,7 +21,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; # Major version is hard-wired into the script. We update it when we branch # a new development version. diff --git a/src/tools/win32tzlist.pl b/src/tools/win32tzlist.pl index 657f7d4879..3a1ca4cb15 100755 --- a/src/tools/win32tzlist.pl +++ b/src/tools/win32tzlist.pl @@ -16,7 +16,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Win32::Registry; -- 2.41.0