On Thursday, November 23, 2017, Emi <emilu(at)encs(dot)concordia(dot)ca> wrote:
>
> Tried:
> psql -h db1 -U u1 -d d1 -c "\copy t1 to test.csv with CSV ENCODING
> 'UTF8' "
> Got: \copy: parse error at "encoding"
>
>
You are mixing obsolete and non-obsolete syntax. The current
syntax requires parentheses around the with options and all options written
as key-value pairs.
David J.