RE: ouch

From: Michael Dinh <mdinh_at_XIFIN.Com>
Date: Wed, 31 Aug 2011 19:09:01 -0700
Message-ID: <D29F9902E534D5478F2E83FD6A44B3063B038A7B98_at_mail02.mba.xifin.com>



OMFG, but it does not surprise me.

If you are going to reinvent the wheel, don't make it a square one.



From: oracle-l-bounce_at_freelists.org [oracle-l-bounce_at_freelists.org] On Behalf Of Uzzell, Stephan [SUzzell_at_MICROS.COM] Sent: Wednesday, August 31, 2011 1:31 PM To: Oracle L
Subject: ouch

Found a gem in one of my databases today:

FUNCTION                        "SUBSTRING"
(INSTRING IN varchar2,
STARTPOS IN number,
LENGTH IN number)
RETURN varchar2
IS
  RESULT varchar2(8000);
BEGIN
select substr(INSTRING, STARTPOS, LENGTH) into RESULT
from DUAL;
RETURN(RESULT);
END; I’m offended by the sheer aesthetics of this. And I want to go yell at the developers that this is wrong. But I’d need a better argument than that it offends me. Is there some way to quantify the impact (if any) of wrapping a built-in function like this?

Stephan Uzzell

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Aug 31 2011 - 21:09:01 CDT

Original text of this message