Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Datatype in stored functions

Re: Datatype in stored functions

From: <Kenneth>
Date: Wed, 20 Aug 2003 20:03:10 GMT
Message-ID: <3f43d1d0.670914@news.inet.tele.dk>


You are quite right, and, as I said: Overloading, as presented by Nuno, should be preferred.

There are, however, some marginal situations, in which overloading cannot be used.

Recently, I had to make a PL/SQL interface to a .NET application. That application immediately crashed when calling an overloaded member function within a package (Sad and true, but not surprising at all, it's MS.....).

On 20 Aug 2003 03:12:44 -0700, bigjobbies_at_hotmail.com (Ethel Aardvark) wrote:

>Implicit conversions will cause problems sooner or later.
>Guaranteed.
>What date is "01/02/03"? 1st Feb 2003? 2nd Jan 2003? Or is it 1903?
>Is "0123456789" my phone number or my salary?
>Is 123,456,789 a list of three 3-digit numbers or a single 9-digit
>number? (Or in some countries, a badly-formed number?)
>
>Even without this approach, you may find that oracle tries to use the
>wrong function and an implicit conversion rather than the correct
>function (I found this in 8.0.? a while ago and spent ages working
>round it). In my case I was calling the NUMBER function from within
>the VARCHAR2 function and oracle wrongly called the VARCHAR2 one with
>an implicit conversion. Be careful with anything approaching recursion
>with overloaded functions and procedures.
>
>The only thing to do is a big load of testing to cover all
>eventualities!
>
>Good luck.
>
>ETA
Received on Wed Aug 20 2003 - 15:03:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US