ads' corner

QNAP: exclude files and directories from rsync

I'm moving files from one QNAP system to another, and I'm using rsync for this. But excluding filed doesn't work!

Single line input for psql copy command

I have the following problem:

A database server and another client machine. I have to execute several \copy commands in psql on the client machine to retrieve data and store the output in CSV files. The PostgreSQL COPY command is not an option because it stores the results on the database server, not the client machine. All \copy commands are executed from several files containing SQL commands, which are concated together by a Makefile and feeded into psql. So far so good.