On Sat, Jan 24, 2004 at 11:17:40AM -0000, Matt Clark wrote:
DBD::Pg
doesn't seem to prefer it after all:
wiki.cgi: DBD::Pg::db do failed: ERROR: parser: unterminated quoted string
at or near "'BZh91AY&SY!!!z" at character 97
Note that this is with auto-quoting/escaping enabled, btw.
Is that with a BYTEA field or a TEXT field? TEXT fields can't handle
character 0 but BYTEA fields should. In any event what I personally do is
Base64 encode before sticking such data in the DB. It's a little more
space, but it avoids quoting issues.
That's a BYTEA field, yes.
Looks like the DBD::Pg module doesn't handle the escaping properly or
something.
I'm happy to stick with BLOBs, partially because they avoid the memory
overhead of having a 20Mb file stored in memory as a return from the DB.
Blobs give you a file descriptor, so i can just iterate until eof, reading and
printing to the client connection.
tjc
--
Turning and turning in the widening gyre
The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold;
Mere anarchy is loosed upon the world.