Re: Emitting JSON to file using COPY TO - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Emitting JSON to file using COPY TO
Date
Msg-id CAEZATCWh29787xf=4NgkoixeqRHrqi0Qd33Z6_-F8t2dZ0yLCQ@mail.gmail.com
Whole thread Raw
In response to Re: Emitting JSON to file using COPY TO  (Joe Conway <mail@joeconway.com>)
Responses Re: Emitting JSON to file using COPY TO
List pgsql-hackers
On Thu, 7 Dec 2023 at 01:10, Joe Conway <mail@joeconway.com> wrote:
>
> The attached should fix the CopyOut response to say one column.
>

Playing around with this, I found a couple of cases that generate an error:

COPY (SELECT 1 UNION ALL SELECT 2) TO stdout WITH (format json);

COPY (VALUES (1), (2)) TO stdout WITH (format json);

both of those generate the following:

ERROR:  record type has not been registered

Regards,
Dean



pgsql-hackers by date:

Previous
From: Paul Jungwirth
Date:
Subject: Re: SQL:2011 application time
Next
From: Robert Haas
Date:
Subject: Re: the s_lock_stuck on perform_spin_delay