Fix string value escaping.

Postgres supports `\'` as an alternate escape sequence for quotes in strings.

A string like `[[\'...]]` would end up `[['\''...']]`, which would allow to build invalid queries.