Heikki Linnakangas wrote:
> The first time the function is run, all the statements in it are=20=20
> planned and the schema used for the insert is resolved. Subsequent=20=20
> calls will reuse the same plan.
This post is apparently related:
http://archives.postgresql.org/pgsql-hackers/2007-02/msg00933.php
-- Pedro Gimeno