Using TEXT columns for binary content - Mailing list pgsql-general

From Mircea Sarbu
Subject Using TEXT columns for binary content
Date
Msg-id NDBBLPEDOLMDDGLHIECACECAHNAA.msarbu@agora.ro
Whole thread Raw
Responses Re: Using TEXT columns for binary content  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Hello,

I work with Postgresql 7.2 using Python and Zope as frontend. I have to deal
with some binary content (just pictures) so I considered the options: BLOB and
BYTEA.

BLOB doesn't works for me (because I have no control on the web hosting
environment).

BYTEA seems to be very slow. So far I know, bytea implies tree steps of
processing: string-literal parser, bytea input function and my own encoding
function (of course, a very lazy one...).

I tried a third way: to use simple TEXT columns for storing the pictures. Using
Python library functions for base64 encoding and decoding everything works fine
(and very fast).

My question is:

There are some hidden drawbacks for this approach? (I don't need any further
processing on the binary content)

Thanks for your advice,

Mircea


pgsql-general by date:

Previous
From: Chris Gamache
Date:
Subject: DBI & DBD::Pg processor load
Next
From: greg@turnstep.com
Date:
Subject: Re: DBI & DBD::Pg processor load