Hello
here is patch, that enables using a variadic parameter modifier for
variadic "any" function.
Motivation for this patch is consistent behave of "format" function,
but it fixes behave of all this class variadic functions.
postgres=> -- check pass variadic argument
postgres=> select format('%s, %s', variadic array['Hello','World']);
format
──────────────
Hello, World
(1 row)
postgres=> -- multidimensional array is supported
postgres=> select format('%s, %s', variadic
array[['Nazdar','Svete'],['Hello','World']]);
format
───────────────────────────────
{Nazdar,Svete}, {Hello,World}
(1 row)
It respect Tom's comments - it is based on short-lived FmgrInfo
structures, that are created immediately before function invocation.
Note: there is unsolved issue - reusing transformed arguments - so it
is little bit suboptimal for VARIADIC RETURNING MultiFuncCall
functions, where we don't need to repeat a unpacking of array value.
Regards
Pavel