mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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.
This commit is contained in:
@ -17,6 +17,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]});
|
||||
$$;
|
||||
@ -28,6 +29,7 @@ LANGUAGE plperlu
|
||||
AS $$
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Indent = 0;
|
||||
elog(INFO, Dumper($_[0]));
|
||||
return scalar(keys %{$_[0]});
|
||||
$$;
|
||||
@ -40,6 +42,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]});
|
||||
$$;
|
||||
@ -54,6 +57,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]});
|
||||
$$;
|
||||
@ -68,6 +72,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}));
|
||||
@ -92,6 +97,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};
|
||||
|
Reference in New Issue
Block a user