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

From Tom Lane
Subject Re: Strange plpgsql performance, diff plperl and plpgsql
Date
Msg-id 13741.1112576538@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strange plpgsql performance, diff plperl and plpgsql  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
List pgsql-general
Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> the array from speed2 is ok, but array from speed is mal formated.

They both look OK to me.

> I declare all function as numeric(7,2)[]

Type modifiers applied to function arguments and results are generally
ignored.  What you have here is functions returning numeric[], and not
anything else.  In the plpgsql example the coercion to numeric(7,2)
happens because you stored into a local variable declared that way,
but there's nothing to make it happen in the plperl example.

            regards, tom lane

pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Question about format_type function
Next
From: Tom Lane
Date:
Subject: Re: Strange plpgsql performance -- arithmetic, numeric() type, arrays