Search Postgresql Archives

Re: JSON fields with backslashes

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

 



Greig Wise <greigwise@xxxxxxxxxxx> 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





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux