query substitutions
swapping in pg escape
swapping in pg_escape
removing console.logging