One more query:
Cant I do something like this:
$2 := $2 + interval ''86399 seconds'';
Where $2 is one of my input variables to the function.It gives me an error:ERROR: $2 is declared CONSTANT