Subject Typeless parameters (was: Re: [Firebird-Architect] FB 2.0 Road Map)
Author Martijn Tonies
> J> would it make more sense to have an operator (or function)
> J> that simply ditched the null?
> it would. That's why we have coalesce() I suppose.
> ditch_null() wouldn't be a bad alias for it, though. :-)

That being said...

I have a question -

Internally, COALESCE etc can take any type of parameters.

Would this be possible to do for Stored Functions and Stored
Procedures. So one could create a function like:

create function DitchNull(param_in) returns ...
if TypeOf(param_in) = Varchar /* or something */
then Result = coalesce(param_in, '');
else if ... etc

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Upscene Productions