why, oh why?
Racer I., February 08, 2019 - 9:10 am UTC
Hi,
Mmmh. This smacks of the dreaded WHEN OTHERS THEN NULL paradigm.
If NULL is good enough for SQL why not for PL/SQL too?
Then you could :
begin
v := f;
IF (v IS NULL) THEN
RAISE ...;
END IF;
end;
Although this looses the real reason.
Or wrap the function in another one for in-SQL-use (like you would also do to map boolean to Y/N or 1/0).
The hack doesn't seem to cover the anonymous block requirement.
Ultimately one would need more info on the real problem this is meant to address.
regards,
February 08, 2019 - 11:07 am UTC
The hack doesn't seem to cover the anonymous block requirement.
Not sure what you're saying there - calling the function in an anonymous block raises NDF, which meets the requirement, no?
Ultimately one would need more info on the real problem this is meant to address.
Indeed. This requirement is a little... unusual. There's probably a better way to achieve this.
mumble
Racer I., February 08, 2019 - 12:26 pm UTC
Hi,
> The hack doesn't seem to cover the anonymous block requirement.
My bad. I tend to group anonymous PL/SQL more with SQL than with packaged PL/SQL. Should have reread that part.
re(ar)gards,
February 08, 2019 - 1:58 pm UTC
No worries :)