Re: JSON fields with backslashes

2023-10-13 Thread Erik Wienhold
On 2023-10-14 00:01 +0200, David G. Johnston write: > On Fri, Oct 13, 2023 at 2:53 PM Greig Wise wrote: > > > 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 creati

Re: JSON fields with backslashes

2023-10-13 Thread Tom Lane
Greig Wise 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

Re: JSON fields with backslashes

2023-10-13 Thread David G. Johnston
On Fri, Oct 13, 2023 at 2:53 PM Greig Wise wrote: > 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. Here is an example I > have of the behavior: