On 08/07/2014 04:48 PM, Tom Lane wrote:
> plpgsql is not efficient at all about coercions performed as a side
> effect of assignments; if memory serves, it always handles them by
> converting to text and back. So basically the added cost here came
> from float8out() and float4in(). There has been some talk of trying
> to do such coercions via SQL casts, but nothing's been done for fear
> of compatibility problems.
Yeah, that's a weeks-long project for someone. And would require a lot
of tests ...
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com