export data from postgresql
Maybe, you can just execute the query in psql and redirect its output to a file after removing all headers. Did you try something like:

$ psql
user=&gt; \o outputfile.txt
user=&gt; \t on
user=&gt; SELECT alll FROM super.a_a;
user=&gt; \q