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 CREATE TABLE
query.
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.
So far, the only program that I've come across that does this is pgfutter 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:
$ ./pgfutter --help
-bash: ./pgfutter: Permission denied
Could anyone suggest a workaround in pgfutter
or another method to import a csv file with straightforward numeric columns automatically to PostgreSQL ?