title: Postgresql: Copy data from CSV to temporary table
body: <p>I would like to copy all data from a csv into a temporary table in order to update a permanent table in PG Admin. I have tried:</p>
  
  <pre><code>CREATE TEMP TABLE tmp_x AS SELECT * FROM "Schema"."Table" LIMIT 0;
  
  copy tmp_x FROM '\\PATH\TO\CSV\FILE.csv' DELIMITER ',' CSV`
  </code></pre>
  
  <p>Which tells me "ERROR:  could not open file "\PATH\TO\CSV\FILE.csv" for reading: No such file or directory" </p>
  
  <p>So then I try the same code but with a backslash before the before "copy" based on this from another thread
  <a href="https://stackoverflow.com/questions/2987433/how-to-import-csv-file-data-into-a-postgresql-table">How to import CSV file data into a PostgreSQL table?</a></p>
  
  <p>And then I get a syntax error due to the slash:
      "ERROR:  syntax error at or near "\"" </p>
  
  <p>Any help would be appreciated</p>
  
  <p>Thanks</p>
  
  <p>Gaz</p>