Remote functions AT remote servers are not documented in SA 12.0.1.
But beside that, they exist, and we can create a proxy function on the current database for a remote function (both SA 12.0.1 databases).
One thing is unknown - what are supported return types? Integer is supported, but char or varchar aren't.
Anyone have list of supported return types in SA 12.0.1 remote functions?
UPDATE 2016-03-07 :
Please check this PDF document with error descriptions, create and query statements, step by step what you can do to replicate this issue.
Thanks for clarifying that. The PDF supplied 2016-03-07 shows the pattern clearly.
Assuming versions 16 and up are behaving the correct way for you, I am going to just assume the question is strictly about the version 12 behaviour.
Basically, V12 is only behaving the way it is because you are using a few off-specification attributes when you attempt to do this that way. The feature you are looking for wasn't intended and never fully implemented until version 16 (and is documented there in the CREATE FUNCTION "at clause", and Remote Procedure Calls (RPCs))
In the V12 docs the RPC reference only describes datatype support for Procedure Parameters only:
whereas the V16 version of the same RPC article added " . . . and RETURN values" just for functions.
The reason that it seems to 'kind-of works' for 12.0.1 is a combination of these factors:
and all sorts of undocumented behaviour can ensue ... as you have found out already.
So no. This is neither an intended feature nor a desireable behaviour of V12 and should not be relied upon or expected to behave well.
That was really the long way around but hopefully that explains the muddy waters better now.