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: PL/SQL : Alternative way of doing if any

Re: PL/SQL : Alternative way of doing if any

From: Billy <vslabs_at_onwe.co.za>
Date: 19 Aug 2005 07:15:41 -0700
Message-ID: <1124460941.691158.144630@o13g2000cwo.googlegroups.com>


Frank van Bortel wrote:

> > Bull! DBMS_OUTPUT does not have an infinite buffer size.
>
> It does, in 10g - the OP did not reveal his version, though.

Ah... did not know that. Thanks for the correction Frank.

But have had errors in 9i because developers used DBMS_OUTPUT extensively and caused DBMS_OUTPUT runtime errors. Instead of coding a single debug proc routine, they call DBMS_OUTPUT all over their code. What is so difficult to understand modularisation or writing a very simplistic debug out routine like
==
create or replace procedure W( line varchar2 ) is begin
  DBMS_OUTPUT.put_line( line );
exception when OTHERS then
  NULL;
end;
==

What is so difficult in grasping the fact that it can easily be made into an autonomous transaction for logging into a table if that need arises to find a strange error when code is run as part of a bigger process via DBMS_JOB?

But no matter how much I harp on modularisation of code (in the office, to people on Metalink support and now here), the fricken penny does not seem to drop.

> > Exactly. You do want the exceptions. You do want unhandled exceptions
> > to be passed up the calling stack.
>
> Agreed

Yeah, because you know what will happen with the OP's code when the table suddenly contains two or more rows for that value and not one row as expected when it was coded and tested. Code still works fine. And there the mysterious run-time errors start to occur.

If an implicit cursor was used, the select would have resulted in a too-many-rows exception and there would not have been a mysterious bug in the system. There would have been a visible exception. Unless of course some dumb bastard coded the following higher up in the call stack:
exception when OTHERS then
  DBMS_OUTPUT.put_line( blah blah )

Re-raise the darn exception you !%@$# nitwit

But then programmers of today seems to have their heads firmly up their asses thinking that old farts like me that has been programming in 15+ languages on everything from mainframes to minis to unix and windows and dos for the last 20 years, does not the relevant experience to provide meaningful comment and opinion.

Worse of all, these young whipper snappers do not even drink coffee. It's all bottled water and maybe decaf. And then they call themselves, programmers... At least they do not have the nerve to call themselves Programmers (with a capital P) - which is what us old farts still are.

--
Billy
--[ Happiness is a well used lead pipe ]--
Received on Fri Aug 19 2005 - 09:15:41 CDT

Original text of this message

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