Hello
attached patch allows to store typmode for function parameters andfunction result. This patch is base for parametrised polymorphic typeswhat was discussed moth ago.
regardsPavel Stehule