End of data can be represented by a single line containing just backslash-period (\.). An end-of-data marker is not necessary when reading from a file, since the end of file serves perfectly well; it is needed only when copying data to or from client applications using pre-3.0 client protocol.
So if you can somehow add the \. to the end of your data before the extraneous \r\n 's , it will solve your problem.
I tried to import a CSV file into a PostgreSQL table using pgAdmin III. I got an error message: "extra data after last column."
All my spreadsheets have an "end of data" column that has /r/n in each cell. When I import a CSV file into a MySQL table, everything beyond /r/n is ignored. Is there some way to tell PostgreSQL to stop at /r/n?
How does it know when to stop ignoring and start the next record?