title: Copying CSV data into Postgres with Unix Timestamp values
body: <p>It is not really clear how to copy a CSV file that contains unix timestamp values into Postgres. For example, let's say that I have a CSV file that looks like this:</p>
  
  <pre><code>timestamp, column_1, column_2, column_3
  1439935260;"A";"B";"C"
  1439935261;"A";"B";"C"
  1439935262;"A";"B";"C"
  </code></pre>
  
  <p>I also have a database which has the following columns:</p>
  
  <pre><code>timestamp    | timestamp without time zone | 
  column_1     | character varying(40)       | 
  column_2     | timestamp without time zone | 
  column_3     | timestamp without time zone |
  </code></pre>
  
  <p>I would expect the command </p>
  
  <pre><code>\copy my_table FROM 'my_file.csv' DELIMITER ';' CSV HEADER;
  </code></pre>
  
  <p>to work, yet it doesn't. You would receive the error</p>
  
  <blockquote>
    <p>ERROR:  date/time field value out of range: "1439935260"</p>
  </blockquote>
  
  <p>What is the proper way to copy CSV files with unix timestamp values into a table?</p>