Page 1 of 1

Aditional operator functionality

Posted: Fri Mar 02, 2018 11:33 pm
by steved
Some time ago you mentioned that CAST_AS_CHARACTER(OPERATOR) and CAST_AS_OPERATOR(CHARACTER)
exist internally and were going to be exposed to users in a future update. These operators would be a most
welcomed addition to Rel.

As always, thanks for Rel

Re: Aditional operator functionality

Posted: Sun Mar 04, 2018 9:26 am
by Dave
You could define something similar to CAST_AS_CHARACTER(OPERATOR) by retrieving the operator's source code (I assume it's the source code that would be returned by CAST_AS_CHARACTER?) from the sys.Operators relvar.

You can perhaps achieve something akin to CAST_AS_OPERATOR(CHARACTER) by using EXECUTE. E.g:

Code: Select all

EXECUTE "OPERATOR myOpZZZ() RETURNS INT; RETURN 3; END OPERATOR;";

Re: Aditional operator functionality

Posted: Wed Mar 28, 2018 4:41 am
by steved
Sorry for the long delay in responding.
I should have been clear, I was referring specifically to anonymous operators.