Recent versions of Rails (2.3.6 and newer) set standard_conforming_strings = ON from the PostgreSQL adapter. This breaks handling of backslashes, basically because PGconn.escape assumes that the connection is set to the default behavior (standard_conforming_strings = OFF). As a result, backslashes are escaped, when they should not be.
Recent versions of Rails (2.3.6 and newer) set standard_conforming_strings = ON from the PostgreSQL adapter. This breaks handling of backslashes, basically because PGconn.escape assumes that the connection is set to the default behavior (standard_conforming_strings = OFF). As a result, backslashes are escaped, when they should not be.
Workaround: config/initializers/postgres-pr-escape.rb