I worked around it by using select json_agg(t)... and redirecting it to file via psql on the command line. COPY TO was working until we ran into broken JSON and discovered the double quoting issue due to some values containing " in them.
- Re: Emitting JSON to file using COPY TO Joe Conway
- Re: Emitting JSON to file using COPY... Joe Conway
- Re: Emitting JSON to file using COPY TO Maciek Sakrejda
- Re: Emitting JSON to file using COPY TO Joe Conway
- Re: Emitting JSON to file using COPY TO Andrew Dunstan
- Re: Emitting JSON to file using COPY TO Andrew Dunstan
- Re: Emitting JSON to file using COPY TO Davin Shearer
- Re: Emitting JSON to file using COPY TO Joe Conway
- Re: Emitting JSON to file using COPY TO Davin Shearer
- Re: Emitting JSON to file using COPY TO Joe Conway
- Re: Emitting JSON to file using COPY... Davin Shearer
- Re: Emitting JSON to file using COPY... Andrew Dunstan
- Re: Emitting JSON to file using ... Joe Conway
- Re: Emitting JSON to file using ... Andrew Dunstan
- Re: Emitting JSON to file using ... Joe Conway
- Re: Emitting JSON to file using ... Davin Shearer
- Re: Emitting JSON to file using ... Andrew Dunstan
- Re: Emitting JSON to file using ... Davin Shearer
- Re: Emitting JSON to file using ... Joe Conway
- Re: Emitting JSON to file using ... Joe Conway
- Re: Emitting JSON to file using ... Davin Shearer