Re: How to indicate end of clob from pl/sql?
Date: Mon, 15 Sep 2008 06:31:26 -0700 (PDT)
Thanks to those who responded.
It turns out that I was, in fact, getting eof, but that further on downstream the data was blocking waiting for an eof that *I* wasn't sending because I didn't close the stream ( though I did flush it ).
Sorry. But my debugging spidey-sense was kinda drawn to the CLOB stuff because they are 'weird' and I don't fully understand them.
I really wish there were a nice simple type like postgres's TEXT type in oracle. I've never had a need for larger than 2 gigs but I have had need of larger than 4000 characters on more than one occasion.
I believe there is some behind the scenes magic whereby a clob can be written to by one thread of execution and read by another at the same time so that the reader will block until there more data has been written. This would make a clob like a stream? I've never had a need for this, but the fact that it is ( probably ) there, complicates the clob documentation. Also there is something called chunks. I have not messed with the chunksize either.
Is there a limit to how much of a clob Oracle will buffer? Say I read a whole clob and it happened to be a 3 gigger. Does that mean the clob is stored in memory occupying 3 gigs? If not, then what if I want to read it again? I hope it is stored where I can get it again and not just one chunks worth or something annoyingly complicated like that. Then *I* would be responsible for generating the data again. Sheesh!
Something simple for bears-of-little-brain would be nice...
And if there is a way to make such a type using clobs underneath, I would need to understand 'how it works' enough to trust 'that it works'. For that I would need to understand clobs enough to write it myself, and then the benefit of it would be somewhat diminished. Oracle really ought to supply it documenting any performance limitations.
And LONG doesn't work. It's deprecated. Received on Mon Sep 15 2008 - 08:31:26 CDT