title: Postgres COPY FROM csv file- No such file or directory
body: <p>I'm trying to import a (rather large) .txt file into a table geonames in PostgreSQL 9.1. I'm in the /~ directory of my server, with a file named US.txt placed in that directory. I set the <code>search_path</code> variable to geochat, the name of the database I'm working in. I then enter this query:</p>
  
  <pre><code>COPY geonames
  FROM 'US.txt',
  DELIMITER E'\t',
  NULL 'NULL');
  </code></pre>
  
  <p>I then receive this error:</p>
  
  <pre><code>ERROR: could not open file "US.txt" for reading: No such file or directory.
  </code></pre>
  
  <p>Do I have to type in <code>\i US.txt</code> or something similar first, or should it just get it from the present working directory? </p>