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: Clobs and DBMS_LOB

Re: Clobs and DBMS_LOB

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 01 Mar 2006 13:03:20 -0800
Message-ID: <1141246994.913601@jetspin.drizzle.com>


stephen O'D wrote:
> I was recently looking over someone elses code and noticed that they
> were using CLOB's in PLSQL just like varchars, eg:
>
> declare
> v_clob clob;
> begin
> v_clob := v_clob||'some text';
> dbms_output.put_line (v_clob);
> end;
> /
>
> In the past I would have always coded this as:
>
> declare
> v_clob clob;
> begin
> dbms_lob.createTemporary( v_clob );
> dbms_lob.writeappend( v_clob, length('some text'), 'some_text');
> dbms_output.put_line ( dbms_lob.substr(v_clob,255,1) );
> dbms_lob.freeTemporary( v_clob );
> end;
> /
>
> Obviously my version is much more code. Is there any reason for me to
> continue to do this and what version of Oracle allowed you to start
> manipulating clobs so easily? Are there any performance considerations
> between the two methods?
>
> I am running 9.2.0.6 at the moment.
>
> Thanks,
>
> Stephen.

Relying on implicit conversion is always a bad idea.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Wed Mar 01 2006 - 15:03:20 CST

Original text of this message

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