postgresql import csv file postgresql import csv file database database

postgresql import csv file


Your table is created incorrectly. For example, this column declaration:

country_code character varying(10)[] NOT NULL,

is creating an array of varchar(10). You only want one. Drop the [] on those columns.

Also, the sample data you posted is not actually comma-separated, but I'm assuming that the actual data file is.