Hi
I have found two ways for export postgresql to csv using below two commands in windows command terminal:
1) it is to export into remote machine where postgres is running
copy (SELECT firstname, lastname FROM emps ORDER BY lastname, firstname) TO 'E:/file_test' CSV HEADER
2) it is to export into local machine from where we try to connect remote machine
\copy (SELECT firstname, lastname FROM emps ORDER BY lastname, firstname) TO 'E:/file9' CSV HEADER
In node js second command (i.e \copy) is not working using node 'pg' npm package.
Is there any way to use \copy in node js ?
please let me know as soon as possible.......