From 001e114b8d59f4eaf2a314a2bc5e57078afdf82f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 10 Nov 2013 09:20:52 -0500 Subject: Fix whitespace issues found by git diff --check, add gitattributes Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the tree is now clean for git --- src/pl/plperl/sql/plperl_array.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pl/plperl/sql/plperl_array.sql') diff --git a/src/pl/plperl/sql/plperl_array.sql b/src/pl/plperl/sql/plperl_array.sql index 00314726459..66179294ce8 100644 --- a/src/pl/plperl/sql/plperl_array.sql +++ b/src/pl/plperl/sql/plperl_array.sql @@ -46,7 +46,7 @@ CREATE OR REPLACE FUNCTION plperl_concat(TEXT[]) RETURNS TEXT AS $$ my $array_arg = shift; my $result = ""; my @arrays; - + push @arrays, @$array_arg; while (@arrays > 0) { my $el = shift @arrays; @@ -68,7 +68,7 @@ CREATE TYPE foo AS (bar INTEGER, baz TEXT); CREATE OR REPLACE FUNCTION plperl_array_of_rows(foo[]) RETURNS TEXT AS $$ my $array_arg = shift; my $result = ""; - + for my $row_ref (@$array_arg) { die "not a hash reference" unless (ref $row_ref eq "HASH"); $result .= $row_ref->{bar}." items of ".$row_ref->{baz}.";"; @@ -84,7 +84,7 @@ CREATE TYPE rowfoo AS (bar INTEGER, baz INTEGER[]); CREATE OR REPLACE FUNCTION plperl_sum_row_elements(rowfoo) RETURNS TEXT AS $$ my $row_ref = shift; my $result; - + if (ref $row_ref ne 'HASH') { $result = 0; } @@ -109,7 +109,7 @@ CREATE TYPE rowbar AS (foo rowfoo[]); CREATE OR REPLACE FUNCTION plperl_sum_array_of_rows(rowbar) RETURNS TEXT AS $$ my $rowfoo_ref = shift; my $result = 0; - + if (ref $rowfoo_ref eq 'HASH') { my $row_array_ref = $rowfoo_ref->{foo}; if (is_array_ref($row_array_ref)) { -- cgit v1.2.3