COPY INTO on a file works fine on Linux/OSX, but not on Windows #3484
Last updated: 2014-10-31 14:14:07 +0100
Date: 2014-05-21 07:53:40 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
I am running the following two commands on the DB:
CREATE TABLE DS (LopNr BIGINT, LopNr_Relationsperson BIGINT);
This works fine on OSX and Linux, but not on Windows. Error given:
Steps to Reproduce:
COPY INTO succeeds
Date: 2014-05-21 07:54:13 +0200
Created attachment 286
Date: 2014-05-21 07:55:47 +0200
File has emtpy line at the end, but the COPY INTO reflects that so it should be ignored.
Date: 2014-05-21 13:21:30 +0200
Have you tried using ... USING DELIMITERS '\t','\n','"' ... on Windows?
Date: 2014-05-21 17:11:12 +0200
Sjoerd, good guess, that works! Weird...
Date: 2014-05-21 17:21:12 +0200
Of course, this behavior should be somewhat consistent between platforms.
Date: 2014-05-21 17:44:56 +0200
If you're reading a file in TEXT mode on Windows, \r\n in the file are transparently converted to \n as seen by the program. So when you specify \r\n as delimiter, you need an extra \r in the input: one to match the \r in the delimiter, and one to be discarded by the transparent text mode conversion.
In order to make things really consistent between platforms, perhaps we should ignore any \r we encounter, both in the input file and in the delimiter (or perhaps only when the \r occurs just before a \n).
Date: 2014-07-09 14:04:04 +0200
if (on windows) we ignore \r before a \n in de delimiter (when reading
Date: 2014-08-06 19:09:09 +0200
what is the current status of this bug
Date: 2014-09-12 14:56:56 +0200
Date: 2014-10-31 14:14:07 +0100
Oct2014 has been released.
The text was updated successfully, but these errors were encountered: