Insert `tsv` files into postgresql db
You want something like this:
COPY ratings FROM 'C:/Users/testUser/Desktop/TSV/ratings.list.tsv' DELIMITER E'\t';
The E'\t'
is required, otherwise you'll get an error like this:
ERROR: DELIMITER for COPY must be a single one-byte character
If the columns in your TSV don't line up perfectly with your table, you can also define the mapping by doing the following:
COPY ratings (column_1, column_2, ... column_n) FROM 'C:/Users/testUser/Desktop/TSV/ratings.list.tsv' DELIMITER E'\t';
For tab separated values, you can use COPY:
http://www.postgresql.org/docs/current/static/sql-copy.html
Depending on the exact format of your file, it could be something like:
COPY ratings FROM 'C:/Users/testUser/Desktop/TSV/ratings.list.tsv' DELIMITER '\t'