aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plperl/sql/plperl_array.sql
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-11-10 09:20:52 -0500
committerPeter Eisentraut <peter_e@gmx.net>2013-11-10 14:48:29 -0500
commit001e114b8d59f4eaf2a314a2bc5e57078afdf82f (patch)
tree606fa622be346ef917886a29aea7e17383e00d31 /src/pl/plperl/sql/plperl_array.sql
parentdca09ac53329e92d73f45674957c26d3d7ae5117 (diff)
downloadpostgresql-001e114b8d59f4eaf2a314a2bc5e57078afdf82f.tar.gz
postgresql-001e114b8d59f4eaf2a314a2bc5e57078afdf82f.zip
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
Diffstat (limited to 'src/pl/plperl/sql/plperl_array.sql')
-rw-r--r--src/pl/plperl/sql/plperl_array.sql8
1 files changed, 4 insertions, 4 deletions
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)) {