Forum OpenACS Q&A: Read CLOB from Oracle into Tcl?
To my surprise, it looks like the
(release-2_6) does <em>not</em> provide a way to do this! It has
<code>ns_ora write_clob</code> for writing a clob directly to the
connection, and <code>clob_get_file</code> to write to a file - but
The Postgres driver (v. 2.0.1, postgres.c rev. 1.32) on the other
hand, has <code>ns_pg blob_get</code>, which "returns the value of the
blob to the Tcl caller".
So before I go and start hacking my Oracle driver, is this really
true? I didn't just miss it, did I? It seems odd that no one else
would have had this problem before...
Before you get started hacking ora8.c, would you e-mail me? I've changed some things (OCI broke the way aD was reading LONGs somewhere between 8.1.0 and 8.1.6, I fixed it so Schema Browser would work as Oracle uses LONGs throughout the internal datamodel). You should base your work on that and we should then stick it up here under the SDM.
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)