Re: plperl & sort - Mailing list pgsql-bugs

From Tom Lane
Subject Re: plperl & sort
Date
Msg-id 26675.1225827546@sss.pgh.pa.us
Whole thread Raw
In response to Re: plperl & sort  ("Alex Hunsaker" <badalex@gmail.com>)
Responses Re: plperl & sort
List pgsql-bugs
"Alex Hunsaker" <badalex@gmail.com> writes:
> Hrm works for me if I take out the elog from sort()

Even more interesting, this variant *doesn't* work:

regression=# create or replace function trustedsort()
returns int
as $$
my @arr = qw(5 4 3 2 1);
my @sorted = sort { "$a" <=> "$b" } @arr;
elog(NOTICE, join(' ', @sorted));
return 1;
$$
language 'plperl';
CREATE FUNCTION
regression=# select trustedsort();
NOTICE:  5 4 3 2 1
 trustedsort
-------------
           1
(1 row)

Seems like it's the interpolation into a string that is failing.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Alex Hunsaker"
Date:
Subject: Re: plperl & sort
Next
From: "Alex Hunsaker"
Date:
Subject: Re: plperl & sort