The attached patch moves the common elements of loose_embedding[]
and strict_embedding[] to a macro so they can be maintained in
one place. As Tom Lane noticed, ::_plperl_to_pg_array was missing
from strict_embedding[], which appears to be a bug.
http://archives.postgresql.org/pgsql-bugs/2005-08/msg00189.php
I'm not sure this patch meets Tom's request to avoid "too much
violence to the readability," mostly because of the added backslashes
at the end of the macro's lines. Opinions?
--
Michael Fuhr