A workaround to the problem is to add the following two lines to the postgresql server config, postgresql.conf backslash_quote = on standard_conforming_strings = off David