Re: Emitting JSON to file using COPY TO
От | Tom Lane |
---|---|
Тема | Re: Emitting JSON to file using COPY TO |
Дата | |
Msg-id | 398150.1701529880@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Emitting JSON to file using COPY TO (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: Emitting JSON to file using COPY TO
Re: Emitting JSON to file using COPY TO |
Список | pgsql-hackers |
Joe Conway <mail@joeconway.com> writes: >> I noticed that, with the PoC patch, "json" is the only format that must be >> quoted. Without quotes, I see a syntax error. I'm assuming there's a >> conflict with another json-related rule somewhere in gram.y, but I haven't >> tracked down exactly which one is causing it. While I've not looked too closely, I suspect this might be due to the FORMAT_LA hack in base_yylex: /* Replace FORMAT by FORMAT_LA if it's followed by JSON */ switch (next_token) { case JSON: cur_token = FORMAT_LA; break; } So if you are writing a production that might need to match FORMAT followed by JSON, you need to match FORMAT_LA too. (I spent a little bit of time last week trying to get rid of FORMAT_LA, thinking that it didn't look necessary. Did not succeed yet.) regards, tom lane
В списке pgsql-hackers по дате отправления: