Email::Store::Attachment - my losing battle

Luke Ross luke at
Fri Dec 1 15:04:50 GMT 2006


On Fri, Dec 01, 2006 at 02:43:34PM +0000, Christopher Jones wrote:
> Not a PostgreSQL user, and not a techy - so take everything I say with 
> a pinch of salt!
> But googling didn't satisfy me that it does - on the guide I found, 
> there was no sign of a type called 'BLOB'. And it didn't seem that the 
> bytea type is equivalent.

Traditionally PostgreSQL didn't handle large binary objects very well, 
so normally you use the large object support which gave you a 
stream-like framework for having large bits of binary in your db - see This 
was clunky as it needed it's own API.

However PostgreSQL now uses a system called TOAST which better supports 
large items in tables, and to store binary you need to use bytea. The 
docs state:

"The SQL standard defines a different binary string type, called BLOB or 
BINARY LARGE OBJECT. The input format is different from bytea, but the 
provided functions and operators are mostly the same."

So bytea is Postgres's BLOB type.


``David Blunkett, whom I much admire....'' (Lord Tebbit)

More information about the mailing list