jruby/activerecord-jdbc-adapter — Issue #174: Binary data stored as escaped string with postgresql adapter
Author: donv
Created: 2012-02-19 01:32:44+00:00
State: open

Hi!

I recently upgraded my gem set with both Rails 2.3 => 3.1 and ARJDBC to 1.2.2

Since then file uploads have broken. I have found that the files are stored as escaped strings in the database. Unescaping them before use works, but I really want the actual binary data stored in the DB.

I do a plain file.read on the file presented by Rails like I have always done which complies with all examples I can find. I sthere anything else I should be doing when storing the file?

The column type is :binary in migration/schema dump and bytea in the database.