Re: Emitting JSON to file using COPY TO
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Joe Conway <mail@joeconway.com>
Cc: "Andrey M. Borodin" <x4mmm@yandex-team.ru>,
Dean Rasheed <dean.a.rasheed@gmail.com>, Daniel Verite <daniel@manitou-mail.org>,
Andrew Dunstan <andrew@dunslane.net>, Davin Shearer <davin@apache.org>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-11-19T06:16:52Z
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 →
-
Add option force_array for COPY JSON FORMAT
- 4c0390ac53b7 19 (unreleased) landed
-
json format for COPY TO
- 7dadd38cda95 19 (unreleased) landed
-
introduce CopyFormat, refactor CopyFormatOptions
- a2145605ee3d 19 (unreleased) landed
-
Doc: add IDs to copy.sgml's <varlistentry> and <refsect1>
- e4018f891dec 19 (unreleased) cited
Attachments
- v13-0002-introduce-json-format-for-COPY-TO.patch (text/x-patch) patch v13-0002
- v13-0003-Add-option-force_array-for-COPY-JSON-FORMAT.patch (text/x-patch) patch v13-0003
- v13-0001-Introduce-CopyFormat-and-replace-csv_mode-and-bi.patch (text/x-patch) patch v13-0001
hi. there.
new patch attached.
v13-00001 is from
https://postgr.es/m/fbc63db8-94de-45f6-b327-50456630264d@app.fastmail.com
just refactoring copy format.
The author is Joel Jacobson!
v13-0002, v13-0003 almost the same as previously v12.
some minor change compared to v12:
* refactor code, based on v13-0001. instead of a bool in
CopyFormatOptions-> json_mode
now we use
typedef enum CopyFormat
{
COPY_FORMAT_TEXT = 0,
COPY_FORMAT_BINARY,
COPY_FORMAT_CSV,
COPY_FORMAT_JSON,
} CopyFormat;
to represent the format of the COPY operation.
* make JSON format cannot be used with {default, null, delimiter}
options. and add related tests, documentation.
* add tab_complete