Re: Strange plpgsql performance, diff plperl and plpgsql - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Strange plpgsql performance, diff plperl and plpgsql
Date
Msg-id Pine.LNX.4.44.0504040138340.13204-100000@kix.fsv.cvut.cz
Whole thread Raw
In response to Re: Strange plpgsql performance -- arithmetic, numeric()  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: Strange plpgsql performance, diff plperl and plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello,

I found different behavior of array inicialised from plperl than plpgsql.
I use code from my prev. mail

tarif=# select speed(10);
         speed
-----------------------
 {0,1,2,3,4,5,6,7,8,9}
(1 row)

Time: 2,304 ms
tarif=# select speed2(10);
                        speed2
------------------------------------------------------
 {1.00,2.00,3.00,4.00,5.00,6.00,7.00,8.00,9.00,10.00}
(1 row)

Time: 0,863 ms

the array from speed2 is ok, but array from speed is mal formated.
I declare all function as numeric(7,2)[]

when I change init value on 0.01, than results are equal

regards
Pavel Stehule


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Strange plpgsql performance -- arithmetic, numeric()
Next
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] plPHP in core?