Re: JSON fields with backslashes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: JSON fields with backslashes
Дата
Msg-id 1593973.1697234503@sss.pgh.pa.us
обсуждение исходный текст
Ответ на JSON fields with backslashes  (Greig Wise <greigwise@comcast.net>)
Список pgsql-general
Greig Wise <greigwise@comcast.net> writes:
> Hello.  I have run into an issue when using the copy command on tables
> with json columns where Postgres seems to improperly escape backslashes
> under certain conditions thus creating invalid JSON.

AFAICS this is COPY's normal behavior: it doubles backslashes in
the default format.  You could use CSV format, perhaps, but that
has its own quoting rules that also mean that what comes out is
not going to be json-and-nothing-but.  See "File Formats" here:

https://www.postgresql.org/docs/current/sql-copy.html

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: JSON fields with backslashes
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: JSON fields with backslashes