Hi,
I am trying to perform a copy using a query.
This works for example:
This on the other hand doesn't work:
Any ideas how to get this to work?
I am trying to perform a copy using a query.
This works for example:
Code:
psql -h localhost -U admin suppliers -c 'COPY connections TO STDOUT WITH CSV' > /tmp/suppliers.csv
This on the other hand doesn't work:
Code:
psql -h localhost -U admin suppliers -c 'COPY (select id, latitude, longitude from connections order by id) TO STDOUT WITH CSV' > /tmp/suppliers.csv
Any ideas how to get this to work?