I am using following psql query to connect to a remote host and split a big table into multiple csv files.
psql -h xx -p xx -U xx -d xx -c "\COPY (select * from table) TO program 'split --lines 1000' (format csv)
I am not getting what mistake I am making here.