Re: COPY TO STDOUT WITH (FORMAT CSV, HEADER), and embedded newlines

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: COPY TO STDOUT WITH (FORMAT CSV, HEADER), and embedded newlines
Дата
Msg-id CAKFQuwarYcnb4CDT3BjjZfEdvPnAFcM+NYU2Yv4L_tBNA43hPA@mail.gmail.com
обсуждение исходный текст
Ответ на COPY TO STDOUT WITH (FORMAT CSV, HEADER), and embedded newlines  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
On Friday, March 11, 2022, Dominique Devienne <ddevienne@gmail.com> wrote:
I've tracked these to text values in the DB with embedded
newlines. These values are 'normal'. I'm not use to CSV, but I suppose
such newlines
must be encoded, perhaps as \n, since AFAIK CSV needs to be 1 line per row, no?

Haven’t tested but the docs indicate, and I do recall from memory, that PostgreSQL does indeed use \r and \n in content so what you are describing would be a bug if proven true.  Can you produce something that only uses psql that shows this problem?  If not, whatever “auto rset = my_exec(…)” is doing is probably at fault.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: COPY TO STDOUT WITH (FORMAT CSV, HEADER), and embedded newlines
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: COPY TO STDOUT WITH (FORMAT CSV, HEADER), and embedded newlines