pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_dump: Dump colliculocale
7+ messages / 4 participants
[nested] [flat]

* pgsql: pg_dump: Dump colliculocale
@ 2022-08-24 18:27  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Peter Eisentraut @ 2022-08-24 18:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: Dump colliculocale

This was forgotten when the new column was introduced.

Author: Marina Polyakova <m.polyakova@postgrespro.ru>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://www.postgresql.org/message-id/7ad26354e75259f59c4a6c6997b8ee32%40postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/396d348b046c6b7e5dc83158c4c1df1377a1d2ef

Modified Files
--------------
src/bin/pg_dump/Makefile         |  1 +
src/bin/pg_dump/pg_dump.c        | 50 +++++++++++++++++++++++++++++++++-------
src/bin/pg_dump/t/002_pg_dump.pl | 28 +++++++++++++++++++++-
3 files changed, 70 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: pg_dump: Dump colliculocale
@ 2022-08-24 18:27  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Peter Eisentraut @ 2022-08-24 18:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: Dump colliculocale

This was forgotten when the new column was introduced.

Author: Marina Polyakova <m.polyakova@postgrespro.ru>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://www.postgresql.org/message-id/7ad26354e75259f59c4a6c6997b8ee32%40postgrespro.ru

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/72b6828da3f72bdcf87f680fe37a90ce964793cc

Modified Files
--------------
src/bin/pg_dump/Makefile         |  1 +
src/bin/pg_dump/pg_dump.c        | 50 +++++++++++++++++++++++++++++++++-------
src/bin/pg_dump/t/002_pg_dump.pl | 28 +++++++++++++++++++++-
3 files changed, 70 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: pg_dump: Dump colliculocale
@ 2022-08-24 19:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2022-08-24 19:47 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org

Peter Eisentraut <peter@eisentraut.org> writes:
> pg_dump: Dump colliculocale

The *BSD buildfarm members don't seem too happy with the new test case.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: pg_dump: Dump colliculocale
@ 2022-08-25 01:46  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2022-08-25 01:46 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org

I wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> pg_dump: Dump colliculocale

> 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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: pg_dump: Dump colliculocale
@ 2022-08-25 04:50  Marina Polyakova <m.polyakova@postgrespro.ru>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Marina Polyakova @ 2022-08-25 04:50 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter@eisentraut.org>; pgsql-committers@lists.postgresql.org

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.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..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;
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: pgsql: pg_dump: Dump colliculocale
@ 2022-08-25 05:03  Marina Polyakova <m.polyakova@postgrespro.ru>
  parent: Marina Polyakova <m.polyakova@postgrespro.ru>
  0 siblings, 1 reply; 7+ messages in thread

From: Marina Polyakova @ 2022-08-25 05:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter@eisentraut.org>; pgsql-committers@lists.postgresql.org

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;
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: pgsql: pg_dump: Dump colliculocale
@ 2022-08-25 12:52  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  parent: Marina Polyakova <m.polyakova@postgrespro.ru>
  0 siblings, 0 replies; 7+ messages in thread

From: Peter Eisentraut @ 2022-08-25 12:52 UTC (permalink / raw)
  To: Marina Polyakova <m.polyakova@postgrespro.ru>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

Thanks, I had already fixed it.

On 25.08.22 07:03, Marina Polyakova wrote:
> 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
> 






^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2022-08-25 12:52 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 18:27 pgsql: pg_dump: Dump colliculocale Peter Eisentraut <peter@eisentraut.org>
2022-08-24 19:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-08-25 01:46   ` Tom Lane <tgl@sss.pgh.pa.us>
2022-08-25 04:50     ` Marina Polyakova <m.polyakova@postgrespro.ru>
2022-08-25 05:03       ` Marina Polyakova <m.polyakova@postgrespro.ru>
2022-08-25 12:52         ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2022-08-24 18:27 pgsql: pg_dump: Dump colliculocale Peter Eisentraut <peter@eisentraut.org>

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