Subject RE: [Firebird-Architect] FB 2.0 Road Map
Author Claudio Valderrama C.
Martijn Tonies wrote:
>>
>> Oracle way of adding built-in functions seems like better idea to me.
>> Something like MODIFIED(A, B) returning TRUE if A differs from B
>> considering null as a special value seems to look better.
>
> Now, this could easily be done if we had Stored Functions and
> typeless parameters ;-)

Do you know who can do this? UDF's, of course. No joke. They can emulate
typeless input parameters without any engine modification. But their return
param type is fixed, although intermediate conversions can happen.
Problem: there were two types of UDF: value and boolean. The second never
was implemented but only documented and a "type" field assigned in a system
table (for different, prospective UDF types). The parser knows nothing about
boolean UDF's, too. People would have to live with
if CHANGED(x, y) = 1
then ...
until we implement the boolean type.

The functionality probably can be implemented by an internal UDF, although a
good dose of *** code duplication would happen. There would be limitations
that would make the feature incomplete, unless the engine is told to
distinguish between built-in UDF's and typical external functions.

C.