Re: Emitting JSON to file using COPY TO

From: Davin Shearer <davin(at)apache(dot)org>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Emitting JSON to file using COPY TO
Date: 2023-12-05 17:43:31
Message-ID: CALvfUkAbj4Bwg0FjYpvj0-zddcetWg1Sejt=OGBTDskbqOFS_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Thanks for the wayback machine link Andrew. I read it, understood it, and
will comply.

Joe, those test cases look great and the outputs are the same as `jq`.

As for forward slashes being escaped, I found this:
https://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped
.

Forward slash escaping is optional, so not escaping them in Postgres is
okay. The important thing is that the software _reading_ JSON interprets
both '\/' and '/' as '/'.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua Drake 2023-12-05 17:56:57 Re: vacuumdb seems not to like option -j when run from crontab
Previous Message roger popa 2023-12-05 17:19:46 Trainning and Certification

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-12-05 18:04:02 Re: UBSan pointer overflow in xlogreader.c
Previous Message Nathan Bossart 2023-12-05 17:40:34 Re: backtrace_on_internal_error