Hello!
Sorry for that, diff_fix_002_pg_dump.patch fixes this issue for me...
On 2022-08-25 04:46, Tom Lane wrote:
I wrote:
The *BSD buildfarm members don't seem too happy with the new test
case.
Not just those. I found that on my RHEL8 box, the new pg_dump
test passes if the environment has LANG=en_US.utf8, and fails
if LANG=C.
regards, tom lane
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index 383bb46b25e5f32d4d8a7cf7d531e2f8f35c8c8a..b60467a5eaae4395e54bdce83891f29fb4aefd83 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -3899,7 +3899,28 @@ if ($collation_check_stderr !~ /ERROR: /)
$collation_support = 1;
}
-my $supports_icu = ($ENV{with_icu} eq 'yes');
+# We need to see if this database encoding supports CREATE COLLATION PROVIDER
+# icu or not. If it doesn't then we will skip all the icu COLLATION-related
+# tests.
+my $supports_icu = 0;
+if ($ENV{with_icu} eq 'yes' && $collation_support)
+{
+ my $icu_check_stderr;
+
+ $node->psql(
+ 'postgres',
+ "CREATE COLLATION testing FROM \"C\" PROVIDER icu;
+ DROP COLLATION testing;",
+ on_error_stop => 0,
+ stderr => \$icu_check_stderr);
+
+ if ($icu_check_stderr !~ /ERROR: /)
+ {
+ $supports_icu = 1;
+ }
+}
+
+# Determine whether build supports LZ4 and gzip.
my $supports_lz4 = check_pg_config("#define USE_LZ4 1");
my $supports_gzip = check_pg_config("#define HAVE_LIBZ 1");
@@ -3940,11 +3961,6 @@ foreach my $test (
$test_db = $tests{$test}->{database};
}
- if (defined($tests{$test}->{icu}))
- {
- $tests{$test}->{collation} = 1;
- }
-
if ($tests{$test}->{create_sql})
{
@@ -3954,7 +3970,7 @@ foreach my $test (
next;
}
- # Skip any icu-related collation commands if build was without icu
+ # Skip any icu-related collation commands if there is no icu support
if (!$supports_icu && defined($tests{$test}->{icu}))
{
next;
@@ -4161,7 +4177,7 @@ foreach my $run (sort keys %pgdump_runs)
next;
}
- # Skip any icu-related collation commands if build was without icu
+ # Skip any icu-related collation commands if there is no icu support
if (!$supports_icu && defined($tests{$test}->{icu}))
{
next;