Re: Emitting JSON to file using COPY TO

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Davin Shearer <davin@apache.org>, Joe Conway <mail@joeconway.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-12-04T20:06:31Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add option force_array for COPY JSON FORMAT

  2. json format for COPY TO

  3. introduce CopyFormat, refactor CopyFormatOptions

  4. Doc: add IDs to copy.sgml's <varlistentry> and <refsect1>

On 2023-12-04 Mo 13:37, Davin Shearer wrote:
> Looking great!
>
> For testing, in addition to the quotes, include DOS and Unix EOL, \ 
> and /, Byte Order Markers, and mulitbyte characters like UTF-8.
>
> Essentially anything considered textural is fair game to be a value.


Joe already asked you to avoid top-posting on PostgreSQL lists. See 
<http://idallen.com/topposting.html> 
<http://idallen.com/topposting.html>> for an explanation.

We don't process BOMs elsewhere, and probably should not here either. 
They are in fact neither required nor recommended for use with UTF8 
data, AIUI. See a recent discussion on this list on that topic: 
<https://www.postgresql.org/message-id/flat/81ca2b25-6b3a-499a-9a09-2dd21253c2cb%40unitrunker.net>


cheers


andrew


--
Andrew Dunstan
EDB:https://www.enterprisedb.com