Hello,
I'm trying to import a text file into a table using the COPY command.
The text file contains four columns: id, col_1, col_2, col_3 (in that order).
My target table only has id and col_1.
From the documentation I assumed that the following statement
copy foo (id, col_1)
from 'foo.txt'
with (format csv, delimiter ';', header true);
would only import id and col_1, but instead it fails with "ERROR: extra data after last expected column".
Am I missing something, or is this a limitation of the COPY command?
Regards
Thomas