Binary data from PostgreSQL needs to be cast to str first

This needs to be investigated more - maybe even file a bug?

The error when using PostgreSQL:

    TypeError: coercing to Unicode: need string or buffer, buffer found