I'm not massively familiar with Postgres so apologies if this is a silly question.
I'd like to create a crontab job on a server that will run a query and export the results to CSV in a directory on a different server.
The reason for this is that the resulting file needs to be web accessible so needs to be copied to a folder on an http server. However, the http server I have access to does not have postgres installed (so no \copy or pgsql commands locally) and the database server doesn't have directories exposed to http.
So, is it possible to create a batch script, presumably on the server with posgres installed that will copy the query results to a csv on a different server?