Search Postgresql Archives

Re: \COPY from CSV ERROR: unterminated CSV quoted field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ogromm <alex.schiller1990@xxxxxx> writes:
> I get the error "unterminated CSV quoted field" when I try to copy text with
> "new line \. new line"

> For example:

> CREATE TABLE test (text TEXT);
> \COPY test FROM 'test.csv' WITH DELIMITER ',' CSV HEADER;

> test.csv:
> Text
> "some text
> \.
> more text"

Yeah, psql's \copy command doesn't know anything about CSV mode, and
will take \. as an EOF marker even though it shouldn't.  If you need
to copy data like this I'd suggest using a backend-side COPY.

			regards, tom lane



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux