Re: Emitting JSON to file using COPY TO
От | Andrew Dunstan |
---|---|
Тема | Re: Emitting JSON to file using COPY TO |
Дата | |
Msg-id | 2554e520-e103-8978-dcb5-807dfeb77402@dunslane.net обсуждение исходный текст |
Ответ на | Re: Emitting JSON to file using COPY TO (Davin Shearer <davin@apache.org>) |
Ответы |
Re: Emitting JSON to file using COPY TO
|
Список | pgsql-hackers |
On 2023-12-05 Tu 14:50, Davin Shearer wrote: > Hi Joe, > > In reviewing the 005 patch, I think that when used with FORCE ARRAY, > we should also _imply_ FORCE ROW DELIMITER. I can't envision a use > case where someone would want to use FORCE ARRAY without also using > FORCE ROW DELIMITER. I can, however, envision a use case where > someone would want FORCE ROW DELIMITER without FORCE ARRAY, like maybe > including into a larger array. I definitely appreciate these options > and the flexibility that they afford from a user perspective. > > In the test output, will you also show the different variations with > FORCE ARRAY and FORCE ROW DELIMITER => {(false, false), (true, false), > (false, true), (true, true)}? Technically you've already shown me the > (false, false) case as those are the defaults. > > I don't understand the point of FORCE_ROW_DELIMITER at all. There is only one legal delimiter of array items in JSON, and that's a comma. There's no alternative and it's not optional. So in the array case you MUST have commas and in any other case (e.g. LINES) I can't see why you would have them. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: