I have a data file that has values sepparated by '|' character like:
COPY tableName FROM 'file.tbl' DELIMITER '|';
When I try to COPY these values into a table like the above statement it outputs the error:
This is because every line ends in a '|', I really don't want to create an extra column at the end unless strictly necessary because I have to this process for many tables. So one workaround that people suggest on other questions is to only COPY the first three columns of the file like:
COPY tableName (name, location, datetime) FROM 'file.tbl' DELIMITER '|';
but this outputs the same error as before.