---------- Forwarded message ---------- Date: Mon, 23 Feb 2004 16:45:17 +1000 From: [EMAIL PROTECTED] Subject: Re: [sqlite] handling of binary data
Darren Duncan <[EMAIL PROTECTED]> 23/02/2004 04:20 PM > I would think, myself, that the best way to fix SQLite for proper > binary data handling is to treat *everything* as binary data. You > would do this instead of treating everything as a null-terminated > string. This is easy to say, and easy to do in the back-end. I belive this is more-or-less the direction DRH is heading in, although finding all those pesky strcmp etc can be tricky... but what about the parser? How do you parse the string: "INSERT INTO Foo VALUES (\"\0\"\");"? A human can see I meant to insert the null character, then a quote. How does the parser of this C string know not to stop at the first '\0', and how does it know that the first '"' was meant to be part of the string? Do you force me to put in a number in this syntax, too? "INSERT INTO Foo Values(binary(2,\0\"));" could work, I suppose. Then you could say "SELECT length(Bar),Bar FROM Foo;" to get the length and data so it can be copied back out again... although it might be more convenient to include this automatically in the callback function. Nevertheless, DRH has said he's working on this. I'm sure there's nothing your or I could say that will improve his understanding of the problem :) If there was, I'm also sure he'd ask. Benjamin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

