I’m trying to insert binary data into a PostgreSQL database where the
field is of type ‘bytea’. This works fine if a do Base64 encoding but I
just want to do character escaping. How do I do this???.
What I get is this:
ActiveRecord::StatementInvalid in Init_test#save_file
ArgumentError: Invalid Ruby/cstring: INSERT INTO
VALUES(‘10fcfa244eb972c6de695be235d11f98’, ‘0’, ‘test’, ‘myfilename’,
‘500000’, ‘NOW()’, ‘ï¿½Bï¿½ï¿½Hï¿½3ï¿½!g1hVï¿½ï¿½9 blaaaahh more binary data…’
I have got a indication that this should be done automatically, but does
this hold for the postgres-pr module?
Btw, I’m using Ruby 1.8.2, postgres-pr 0.4.0 and Rails 1.0.0