fixes psql quote escaping