[MonetDB-users] Function overloading
Hi,
I am trying to create an overloaded iif function, so I created these custom functions:
1. create function iifnew(tv timestamp, fv timestamp, cond boolean) returns timestamp begin if cond then return tv; else return fv; end if; end
2. create function iifnew(tv int, fv int, cond boolean) returns int begin if cond then return tv; else return fv; end if; end
3. create function iifnew(tv string, fv string, cond boolean) returns string begin if cond then return tv; else return fv; end if; end
But now, if I do something like this:
update table1 set "Column1" = iifnew('hello1', 'hello2', ("Column2" = "Column3"))
I get this: !SQLException:int:conversion of string 'hello1' failed
Is this a bug in function overloading? I am running Feb2009 from CSV on Windows.
Thanks.
participants (1)
-
Alex Bo.