Correctly escape query values on Postgres.