Re: Oracle CLOB

From: Peter J. Holzer <hjp-usenet2_at_hjp.at>
Date: Thu, 23 Sep 2010 20:57:46 +0200
Message-ID: <slrni9n8pa.mpl.hjp-usenet2_at_hrunkner.hjp.at>



On 2010-09-23 16:59, The Magnet <art_at_unsu.com> wrote:
> On Sep 23, 11:36 am, "Gerard H. Pille" <g..._at_skynet.be> wrote:
>> The Magnet wrote:
>> > Well, sorry for being like this.  But a CLOB can handle 4GB, right?
>> > So, I would think the problem is between PHP and Oracle, maybe
>> > something in the communication?
>>
>> Read my lips: Oracle SQL can only handle 4K.
>
> 4k? What is the use of CLOB if it can only handle 4k, make it a
> VARCHAR2? That makes no sense.
>
> A stored procedure should be able to receive a CLOB and store it in a
> CLOB column. Heck, think of the articles on CNN and other sites. Do
> you think they are only 4k? Most images are greater than 4k also.

A CLOB can be up to 4 GB, but you cannot access it as a whole from SQL (or PL/SQL). You can only read and write it in chunks of a few kB at a time. Some drivers (e.g. the DBD::Oracle driver for Perl) do that behind the scenes so that it looks like you can just insert/update/select a LOB, I don't know about the PHP driver. If it doesn't give you a convenient way to access LOBs, you take a look at the DBMS_LOB package.

        hp Received on Thu Sep 23 2010 - 13:57:46 CDT

Original text of this message