Forum OpenACS Q&A: Re: Response to Read CLOB from Oracle into Tcl?

Collapse
Posted by Ryan Gallimore on
Don, can you clarify how to read clobs like varchars? to_char(v_clob) would not be able to handle anything greater than 4000 chars.
Collapse
Posted by Jeff Rogers on
IIRC, the oracle driver recognizes clob locators in the select result and issues the appropriate OCI calls under the covers to fetch the lob. So a plain ordinary select including a lob column should just work.

The only catch is that there ends up being an extra roundtrip to the oracle server for each locator, i.e., probably each row, which can be very slow compared to to_char(lob) or dbms_lob.substr(lob)

Collapse
Posted by Ryan Gallimore on
I fixed the problem of reading back a large clob by changing the LobBufferSize in my config.tcl to 500000.