aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-08-25 06:35:16 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-08-25 06:41:47 +0200
commitf2dcf1acfbd8d23e1651293cd3c83c0443b45143 (patch)
treef9e6f47bc49a42408ab6fca45176ce3295014afe
parent36a8881c4bfe578e94ba97a5140d7850ffa87bed (diff)
downloadpostgresql-f2dcf1acfbd8d23e1651293cd3c83c0443b45143.tar.gz
postgresql-f2dcf1acfbd8d23e1651293cd3c83c0443b45143.zip
pg_dump: Fix new ICU tests
ICU doesn't support some server encodings, so we need to exclude them if a non-supported encoding was set up.
-rw-r--r--src/bin/pg_dump/t/002_pg_dump.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index 4924e119ce8..ab28f750df7 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -3881,6 +3881,10 @@ my $supports_icu = ($ENV{with_icu} eq 'yes');
my $supports_lz4 = check_pg_config("#define USE_LZ4 1");
my $supports_gzip = check_pg_config("#define HAVE_LIBZ 1");
+# ICU doesn't work with some encodings
+my $encoding = $node->safe_psql('postgres', 'show server_encoding');
+$supports_icu = 0 if $encoding eq 'SQL_ASCII';
+
# Create additional databases for mutations of schema public
$node->psql('postgres', 'create database regress_pg_dump_test;');
$node->psql('postgres', 'create database regress_public_owner;');