sqlalchemy.dialects.postgresql.BYTEA has incorrect documentation
DOCS: """ Construct a LargeBinary type.
Parameters: length – optional, a length for the column for use in DDL statements, for those BLOB types that accept a length (i.e. MySQL). It does not produce a small BINARY/VARBINARY type - use the BINARY/VARBINARY types specifically for those. May be safely omitted if no CREATE TABLE will be issued. Certain databases may require a length for use in DDL, and will raise an exception when the CREATE TABLE DDL is issued. """
BYTEA isn't a BLOB. ( see http://www.postgresql.org/docs/9.1/static/datatype-binary.html )
The sql standard "BLOB" isn't really in postgres. From what i've read, it should be something between a "postgres BLOB" ( as defined by the
lo extension - http://www.postgresql.org/docs/9.1/static/lo.html ) and a BYTEA.
But the BYTEA format is not considered to be a BLOB within postges, and postgres has a separate "blob", so the docs shouldn't refer to this a BLOB . Possibly only mention it as the "binary Byte Array".
There's a separate discussion about actual BLOB support here - https://groups.google.com/d/topic/sqlalchemy/4TCg_TVLgHc/discussion