Hi and thanks in advance. I am currently exporting from my postgres database VIA the psql shell with::
\COPY "Accounts" TO 'C:\Users\admin\Desktop\Accounts.csv' CSV HEADER;
This works fine, but I want to be able to double click a batch file .cmd
or .bat
that is saved on my desktop to 1) log into the database 2) export the CSV.
So that way I dont have to go into psql shell every time. Please help, I did google but postgres resources are few.