I want import in PostgreSQL csv table with next structure:
1,qw,sdf,ty
2,efw,sd,hj,gh,hj
3,sfd,sd,gf,gh,h
4,fg,sd,dff
I use sql query:
CREATE TABLE test("nom" integer, "f1" text, "f2" text, "f3" text, "f4" text, "f5" text);
COPY bptable("nom", "f1", "f2", "f3", "f4", "f5")
FROM 'D:\data.csv'
WITH DELIMITER ',' CSV;
But receive exception: ERROR: extra data after last expected column SQL state: 22P04, row 2. Hope someone can help. Advance thanks.