title: postgres \copy command gives the error : ERROR: syntax error at or near "to"
body: <p>I am trying to copy the contents of a table to a csv file. I used this command : </p>
  
  <p>\copy (select * from table) to '/tmp/a.csv' with delimiter ',';</p>
  
  <p>this gave an error :  ERROR:  syntax error at or near "to"</p>
  
  <p>I tried to use copy instead of \copy, which gave the message :
  ERROR:  must be superuser to COPY to or from a file
  HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.</p>
  
  <p>1) I don't have superuser access to the unix machine or postgres.
  2) I didn't understand the HINT here. Is there any other way for me to output the content of the table to a .csv file ?</p>
  
  <p>Thanks in anticipation.</p>