Escaping delimiter in postgresql
Try:

cat data.csv | psql -d database -c "copy v (a) from stdin with delimiter ',' escape '\' quote '''' CSV header"


You don't need to escape the escape character when specifying it. QUOTE defaults to double-quote so you need to pass that.