A long week, I’m very tired. I went to see Lama Jampa this week, which only took about an hour and a half from where I’m staying but, of course, then I had to drive back. The meeting was very good; he is so wise and I am very lucky to be one of his students. One cannot discuss such meetings in a forum like this but I am carrying on making steady progress and I checked that my new understandings that I gained from his teachings were valid (they are), which is good.
Managed to finally put my deep copy program to bed.
I was tripped up by the database using one of the newer Oracle types, xmltype, because it doesn’t coerce to a varchar. It is effectively a CLOB with some XML operations tagged onto it. So I couldn’t risk retrieving it into our old friend the varchar, which is limited to 32k. So what to do? I hacked the output string so that there was a tag :xmltype: (I added :clob: as well), then after the first retrieve I pulled the type out and forced the contents of the xmltype where the tag was into my output CLOB after chopping it into bits.
Then I was tripped because I put all of my strings into CDATA tags, but the embedded XML had the closing tags for CDATA so it was still broken; but just in a different place. Oracle 9i has a package dbms_xml which has a method for escaping and unescaping embedded XML so now I have to use it on the xmltype column; for good measure testing uncovered that some other varchar strings have XML in them so I use it on everything that isn’t a number or a date.
Finally, the deep copy utility didn’t have one of the tables in it but this table had a cascade delete from another parent which is in the list so when it arrived at the other end it wouldn’t insert. GAH!
Fair play to Oracle, you can now use the replace function and the append operator on the CLOBS, as long as the thing you are appending is less than 2000 characters. I wish that they would lose this distinguishing between CLOBs and varchars and just have some kind of stream supertype, but hey, that would need some original thought.
Moi brane hrtz.
I’ve decided to start on a set of Sci Fi short stories, Grunts, which is about some expendable soldiers who live in a corporate bucket ship killing and breaking things for their masters. I’m going to try and make it amusing and post the chapters here as I write them, and use it as an opportunity to take the piss out of the corporate bollocks I’ve had to experience over the last 20 years, but of course some of them will die.
I need something lightweight to keep myself going in the evenings.
I have redone my novel and transferred it into Open Office.