This is probably super simple yet i can't figure it out, sorry. I created a simple CSV dataset:
product_id,type,profit,revenue
1,Fruit,18,10
2,Vegetable,14,7
3,Electronics,15,29
4,Cosmetics,5,19
5,Cosmetics,4,21
and a respective table in pgAdmin:
CREATE TABLE dataset.products(
product_id int PRIMARY KEY,
type varchar,
profit numeric,
revenue numeric
)
then, used the Import/Export data button and uploaded the file. However, every time I do it, I get an error:
ERROR: invalid input syntax for type integer: "product_id"
CONTEXT: COPY products, line 1, column product_id: "product_id"
I tried different data types for this field: numeric, serial, int (spelled also integer), nothing will work. What am I doing wrong?

product_idinto an integer column now.