Email::Store::Attachment - my losing battle

Chisel Wright chisel at
Wed Nov 29 16:38:12 GMT 2006

On Wed, Nov 29, 2006 at 11:12:42AM -0500, jesse wrote:
> My pre-coffee guess is that it's not binding the column as a blob type
> before doing the insert.  Postgres and DBD::Pg blob support used to suck
> rocks. (RT needed to Base64 binary attachments), but things have
> improved markedly in the past couple of years.

I knew MattL couldn't resist. I've got a bytea column for the payload
now, and a hacked Email::Store::Attachment that now has:

  my $payload = $_->bodyhandle->as_string;
  $payload =~ s/([\x00-\x1f'\\\x7f-\xff])/'\\\\' . sprintf("%03o", ord($1))/eg;

which does get successfully inserted.

I've not fully tested it myself, but MattL seems to have had some
success with it.

Personally, my brain's melting and I need to stop thinking about this
any more this afternoon.

Chisel Wright
e: chisel at

  This is not an automated signature.
  I type this in to the bottom of every message.

More information about the mailing list