title: PostgreSQL: export resulting data from SQL query to Excel/CSV
body: <p>I need to export the resulting data from a query in PostgreSQL to Excel/CSV.<br>
  I use <code>PostgreSQL 8.2.11</code>.</p>
  
  <pre><code>SQL error:
  
  ERROR:  relative path not allowed for COPY to file
  In statement:
  
  COPY (select distinct(m_price) from m_product)TO '"c:\auto_new.txt"';
  </code></pre>