pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_dump: Dump colliculocale
Date: Thu, 25 Aug 2022 08:03:02 +0300
Message-ID: <010959906752e636fec361b059f4a4df@postgrespro.ru> (raw)
In-Reply-To: <db3077e5852c9cf6f14d1254a4ea6d7c@postgrespro.ru>
References: <E1oQv5f-0011vU-Mw@gemulon.postgresql.org>
	<1149326.1661370455@sss.pgh.pa.us>
	<1307785.1661391981@sss.pgh.pa.us>
	<db3077e5852c9cf6f14d1254a4ea6d7c@postgrespro.ru>

More precisely, diff_fix_002_pg_dump_v2.patch...

On 2022-08-25 07:50, Marina Polyakova wrote:
> 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

Attachments:

diff_fix_002_pg_dump_v2.patch (text/x-diff, 1.8K) download diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index 383bb46b25e5f32d4d8a7cf7d531e2f8f35c8c8a..0c5761f4e35933d9b424c9c0e7deafa376182c73 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 (LOCALE = \"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;

view thread (7+ messages)  latest in thread

Message-ID: <010959906752e636fec361b059f4a4df@postgrespro.ru>
Permalink:  ../010959906752e636fec361b059f4a4df@postgrespro.ru/
Also on:    postgresql.org/message-id/010959906752e636fec361b059f4a4df@postgrespro.ru

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: m.polyakova@postgrespro.ru, tgl@sss.pgh.pa.us, peter@eisentraut.org
  Subject: Re: pgsql: pg_dump: Dump colliculocale
  In-Reply-To: <010959906752e636fec361b059f4a4df@postgrespro.ru>
  References: <E1oQv5f-0011vU-Mw@gemulon.postgresql.org> <1149326.1661370455@sss.pgh.pa.us> <1307785.1661391981@sss.pgh.pa.us> <db3077e5852c9cf6f14d1254a4ea6d7c@postgrespro.ru> <010959906752e636fec361b059f4a4df@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox