Waiting for PostgreSQL 19 – json format for COPY TO
Read OriginalThis article covers the new JSON format option for the COPY TO command in PostgreSQL 19, committed by Andrew Dunstan on March 20, 2026. It allows exporting query results or table data as a stream of JSON objects (one per line, NDJSON style). The feature is currently limited to COPY TO (not COPY FROM) and is incompatible with options like HEADER, NULL, DELIMITER, and FORCE QUOTE. Column list support ensures only specified columns are included. The article also compares JSON output with normal and CSV formats, highlighting escaping differences.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet