ouch
From: Uzzell, Stephan <SUzzell_at_MICROS.COM>
Date: Wed, 31 Aug 2011 20:31:58 +0000
Message-ID: <DF78EADE484D37419A53F5C898629DB7E624D9_at_USMAIL2K1001.us.micros.int>
Found a gem in one of my databases today:
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?
Date: Wed, 31 Aug 2011 20:31:58 +0000
Message-ID: <DF78EADE484D37419A53F5C898629DB7E624D9_at_USMAIL2K1001.us.micros.int>
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-lReceived on Wed Aug 31 2011 - 15:31:58 CDT