title: Import CSV to PostgreSQL programmatically
body: <p>I have a csv with 90 columns that I need to import as a table to my pgsql database (and there are several more csv files with large numbers of columns that I would like to apply this method to).  My aim is to avoid manually designating 90 separate columns with a <code>CREATE TABLE</code> query. </p>
  
  <p>Column headers in the table should remain the same as in the csv and every column should be imported as a numeric data type with a precision of 2 decimal points. </p>
  
  <p>So far, the only program that I've come across that does this is <a href="https://github.com/lukasmartinelli/pgfutter" rel="nofollow noreferrer">pgfutter</a> which I have installed successfully.  However, the database that I am connecting to is a remote one on AWS and it is unclear where to input the connection details.  Also, after installing, I get an error when requesting help info:</p>
  
  <pre><code>$ ./pgfutter --help
  -bash: ./pgfutter: Permission denied
  </code></pre>
  
  <p>Could anyone suggest a workaround in <code>pgfutter</code> or another method to import a csv file with straightforward numeric columns automatically to PostgreSQL ? </p>