Following on from my question here: Procedure parameters - has been defaulted?
I think it would be really useful to be able to see in PL/SQL when the value of a parameter is such because that value has been defaulted, rather than explicitly set by the user user. I.e.
- create procedure x(a in varchar2 default null, b in varchar2 default null, c in varchar2 default null)
- is
- begin
- update xxtab set a1=a, b1=b, c1=c;
- end;
- /
- x(a=>Null, c=>'Carrot');
I have no way in my code of knowing whether the user explicitly supplied Null for the a parameter, or whether it is null because of the default in the procedure spec. The reason being that it would make coding table handlers/API's a lot easier - we could do things differently if the user has explicitly requested a null value in a parameter, and ignore them if they haven't supplied that parameter. We can do this by defaulting dummy "out of range" values, but I find that a bit clumsy. I would like an isDefaulted function (or pseudo-property of a parameter).