On Nov 4, 2008, at 4:43 PM, Andrew Dunstan wrote:
>
> OK, the first thing to note is that there is an easy workaround,
> which is to use a sort routine that doesn't need $a/$b. Example:
>
> create or replace function mysort() returns text language plperl
> as $f$
>
> my $sfunc = sub ($$) { $_[0] <=> $_[1] };
>
> my @vals = (5,3,4,2,7);
>
> return join(' ',sort $sfunc @vals);
>
> $f$;
>
Andrew for the win!
Thanks a lot!
I agree, a documentation note would be fine for this rather doing all
sorts of complicated perl trickery.
--
Jeff Trout <jeff@jefftrout.com>
http://www.stuarthamm.net/
http://www.dellsmartexitin.com/