pgfutter icon indicating copy to clipboard operation
pgfutter copied to clipboard

Import fails with column named "end"

Open dkrozelle opened this issue 6 years ago • 1 comments

Thanks for supporting this awesome tool. I really appreciate the ease of use.

Found a minor bug when attempting to import a table that used the word "end" as a column name. Appears to capture the column names correctly but then fails to import any rows. If this isn't easily fixed a warning message would be very useful. Reprex below:

$ pgfutter csv friends.csv 
3 columns
[name age friends]
 73 B / 73 B [================================================================================================] 100.00% 0s
2 rows imported into public.friends

$ pgfutter csv friends_with_end.csv 
3 columns
[name end friends]

$ cat friends.csv 
name,age,friends
Jacob,26,"Anthony"
Anthony,25,""
Emma,28,"Jacob,Anthony"

$ cat friends_with_end.csv 
name,end,friends
Jacob,26,"Anthony"
Anthony,25,""
Emma,28,"Jacob,Anthony"

pgfutter version 1.2 psql 10.6 (Ubuntu 10.6-1.pgdg18.04+1) Ubuntu 18.04.1 LTS

dkrozelle avatar Feb 26 '19 15:02 dkrozelle

This looks like a duplicate of #59 to me

raginjason avatar Sep 06 '19 21:09 raginjason