diff --git a/hstore-plperl-data-dumper.patch b/hstore-plperl-data-dumper.patch new file mode 100644 index 0000000..dfc2f23 --- /dev/null +++ b/hstore-plperl-data-dumper.patch @@ -0,0 +1,192 @@ +From 69db3b0cfccc0687dfbdf56afcfb2f8e536053c6 Mon Sep 17 00:00:00 2001 +From: Andrew Dunstan +Date: Sun, 14 May 2017 01:10:18 -0400 +Subject: [PATCH] Suppress indentation from Data::Dumper in regression tests + +Ultra-modern versions of the perl Data::Dumper module have apparently +changed how they indent output. Instead of trying to keep up we choose +to tell it to supporess all indentation in the hstore_plperl regression +tests. + +Backpatch to 9.5 where this feature was introduced. +--- + contrib/hstore_plperl/expected/hstore_plperlu.out | 44 ++++++----------------- + contrib/hstore_plperl/sql/hstore_plperlu.sql | 6 ++++ + 2 files changed, 17 insertions(+), 33 deletions(-) + +diff --git a/contrib/hstore_plperl/expected/hstore_plperlu.out b/contrib/hstore_plperl/expected/hstore_plperlu.out +index b09fb78..d719d29 100644 +--- a/contrib/hstore_plperl/expected/hstore_plperlu.out ++++ b/contrib/hstore_plperl/expected/hstore_plperlu.out +@@ -20,15 +20,12 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; + SELECT test1('aa=>bb, cc=>NULL'::hstore); +-INFO: $VAR1 = { +- 'aa' => 'bb', +- 'cc' => undef +- }; +- ++INFO: $VAR1 = {'aa' => 'bb','cc' => undef}; + test1 + ------- + 2 +@@ -39,12 +36,12 @@ LANGUAGE plperlu + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; + SELECT test1none('aa=>bb, cc=>NULL'::hstore); + INFO: $VAR1 = '"aa"=>"bb", "cc"=>NULL'; +- + test1none + ----------- + 0 +@@ -56,15 +53,12 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; + SELECT test1list('aa=>bb, cc=>NULL'::hstore); +-INFO: $VAR1 = { +- 'aa' => 'bb', +- 'cc' => undef +- }; +- ++INFO: $VAR1 = {'aa' => 'bb','cc' => undef}; + test1list + ----------- + 2 +@@ -77,18 +71,12 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0]->[0], $_[0]->[1])); + return scalar(keys %{$_[0]}); + $$; + SELECT test1arr(array['aa=>bb, cc=>NULL'::hstore, 'dd=>ee']); +-INFO: $VAR1 = { +- 'aa' => 'bb', +- 'cc' => undef +- }; +-$VAR2 = { +- 'dd' => 'ee' +- }; +- ++INFO: $VAR1 = {'aa' => 'bb','cc' => undef};$VAR2 = {'dd' => 'ee'}; + test1arr + ---------- + 2 +@@ -101,6 +89,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + + $rv = spi_exec_query(q{SELECT 'aa=>bb, cc=>NULL'::hstore AS col1}); + elog(INFO, Dumper($rv->{rows}[0]->{col1})); +@@ -111,13 +100,8 @@ $rv = spi_exec_prepared($plan, {}, $val); + elog(INFO, Dumper($rv->{rows}[0]->{col1})); + $$; + SELECT test3(); +-INFO: $VAR1 = { +- 'aa' => 'bb', +- 'cc' => undef +- }; +- ++INFO: $VAR1 = {'aa' => 'bb','cc' => undef}; + INFO: $VAR1 = '"a"=>"1", "b"=>"boo", "c"=>NULL'; +- + test3 + ------- + +@@ -138,6 +122,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_TD->{new})); + if ($_TD->{new}{a} == 1) { + $_TD->{new}{b} = {a => 1, b => 'boo', c => undef}; +@@ -147,14 +132,7 @@ return "MODIFY"; + $$; + CREATE TRIGGER test4 BEFORE UPDATE ON test1 FOR EACH ROW EXECUTE PROCEDURE test4(); + UPDATE test1 SET a = a; +-INFO: $VAR1 = { +- 'a' => '1', +- 'b' => { +- 'aa' => 'bb', +- 'cc' => undef +- } +- }; +- ++INFO: $VAR1 = {'a' => '1','b' => {'aa' => 'bb','cc' => undef}}; + SELECT * FROM test1; + a | b + ---+--------------------------------- +diff --git a/contrib/hstore_plperl/sql/hstore_plperlu.sql b/contrib/hstore_plperl/sql/hstore_plperlu.sql +index 8d8508c..c714b35 100644 +--- a/contrib/hstore_plperl/sql/hstore_plperlu.sql ++++ b/contrib/hstore_plperl/sql/hstore_plperlu.sql +@@ -15,6 +15,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; +@@ -26,6 +27,7 @@ LANGUAGE plperlu + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; +@@ -38,6 +40,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0])); + return scalar(keys %{$_[0]}); + $$; +@@ -52,6 +55,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_[0]->[0], $_[0]->[1])); + return scalar(keys %{$_[0]}); + $$; +@@ -66,6 +70,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + + $rv = spi_exec_query(q{SELECT 'aa=>bb, cc=>NULL'::hstore AS col1}); + elog(INFO, Dumper($rv->{rows}[0]->{col1})); +@@ -90,6 +95,7 @@ TRANSFORM FOR TYPE hstore + AS $$ + use Data::Dumper; + $Data::Dumper::Sortkeys = 1; ++$Data::Dumper::Indent = 0; + elog(INFO, Dumper($_TD->{new})); + if ($_TD->{new}{a} == 1) { + $_TD->{new}{b} = {a => 1, b => 'boo', c => undef}; +-- +2.1.4 diff --git a/postgresql.spec b/postgresql.spec index 0f1463e..efe1cc4 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -64,7 +64,7 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 9.6 Version: 9.6.3 -Release: 1%{?dist} +Release: 2%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -109,6 +109,7 @@ Patch2: postgresql-logging.patch Patch3: postgresql-perl-rpath.patch Patch5: postgresql-var-run-socket.patch Patch6: postgresql-man.patch +Patch7: hstore-plperl-data-dumper.patch BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk BuildRequires: perl(ExtUtils::Embed), perl-devel @@ -356,6 +357,7 @@ benchmarks. %patch3 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # We used to run autoconf here, but there's no longer any real need to, # since Postgres ships with a reasonably modern configure script. @@ -1164,6 +1166,9 @@ make -C postgresql-setup-%{setup_version} check %endif %changelog +* Mon May 22 2017 Petr Kubat - 9.6.3-2 +- fix indentation issues in hstore_plperlu test-case (rhbz#1453111) + * Thu May 11 2017 Pavel Raiskup - 9.6.3-1 - update to 9.6.3 per release notes: https://www.postgresql.org/docs/9.6/static/release-9-6-3.html