Oracle – for when it was like that when you got there

Main menu

Post navigation

Too many declarations of “+” match this call – When Compilers lie

A compiler is often your best friend as a programmer. It will helpfully point out the fact that you may have made a typo, or are about to do something silly. Most of the time, it’ll even helpfully point out where exactly you’ve not quite got it spot on.
But, like any long-term relationship, the Programmer and the Compiler do have the occasional falling out. This happens especially when the compiler becomes recalcitrant, uncommunicative, cryptic, or just flat out lies to you.

Being primarily a PL/SQL programmer my particular relationship is with the ADA pre-compiler that lives inside Oracle. Her name is DIANA.

SELECT *
FROM v$sgastat
WHERE name LIKE '%DIANA%';

And there she is, basking in the Shared Pool.

My early days with DIANA were idyllic, I was just beginning to come to terms with the fact that someone was willing to pay me money for mucking around with computers.
Then one day, out of the blue, I was compiling a Form when she informed me :PLS-307 – Too many declarations of '+' match this call.

Say WHAT ?
What on earth does it mean ? Is it just her way of complaining that I never buy her flowers ?
After much head-scratching, this turned out to be, what I’d known up until then as, a type mismatch error ( it was a long time ago, but I distinctly recall that I was doing something silly like trying to add together values of incompatible types). Since then, that message has come up from time to time, usually as the result of an ambiguous call to an overloaded procedure.

It turns out however, that DIANA has an evil sister. She seems to live in the forms generation utility. She tells lies.
With 10g Application Server on Red Hat, when generating a Form containing a mirror item, you’re more than likely to get the following warning :FRM-30457 Warning : Maximum Length ignored for character-datatype subordinate mirror item item name

According to the Forms help, this warning is generated when a non-zero value is specified for the Maximum Length property for a subordinate mirror item.
At this point, things get interesting. Check the Maximum Length of the offending item and…hmmm…it IS set to zero.
You can’t unset the property in Forms Designer. You can’t specify “NULL” either ( you get a value error in Designer when you navigate out of the field).
So, the compiler is lying, and there’s no way to fix what it’s complaining about.
The fmx still gets generated, so all you can do is just ignore this attention seeking behaviour and realise that, with women, sometimes you just can’t win.

Then again…there was another occasion on which we had an engineer come to investigate an issue on the processors in a Sequent box. After a day of intensive examination, he informed us that the problem was not reproducable and was in fact due to “Cosmic Particles”.

From that day forward, any wierd programming quirk has always be known to me as a Cosmic Particle Error.
Quantum Physics and relationship advice. I ask you, what other Oracle Blog offers that ?