Joe Conway <mail@joeconway.com> writes:
> So based on this simple test, I'd say that if you only run the function
> once per connect, use plpgsql, but if you run the function many times
> during one backend session, use perl.
Presumably, the 50 msec difference represents the time to load up the
perl library and initialize a perl interpreter.
It might help if libperl were to be preloaded into the postmaster in the
way you created ...
regards, tom lane