changed blob handling for PostgreSQL