From: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
---|---|
To: | mso1830(at)gmail(dot)com |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14116: Character with value 0x0a must be escaped. using COPY FROM |
Date: | 2016-04-28 09:24:34 |
Message-ID: | CA+bJJbxT4nZba9phkro+5+7F2Tg26skfswKsH_LLDowKFH_iFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Apr 27, 2016 at 10:02 AM, <mso1830(at)gmail(dot)com> wrote:
> I tried to inserte large json rows from text file into postgres DB. however,
> there is error message says:
> ERROR: invalid input syntax for type json
> DETAIL: Character with value 0x0a must be escaped.
> CONTEXT: JSON data, line 1: ...at is closer rather than farther from the
Seems right, all the json documents I have read say, more or less "A
string is a sequence of Unicode code points wrapped with quotation
marks (U+0022). All characters may be placed within the quotation
marks except for the characters that must be escaped: quotation mark
(U+0022), reverse solidus (U+005C), and the control characters U+0000
to U+001F." ( Copied from
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf,
which may not be the correct one but seems right for me ).
In fact, noneof the software I presently use to read or generate json
does accept OR PRODUCE unescaped 0x0A. Are you generating the json
manually?
Francisco Olarte.
From | Date | Subject | |
---|---|---|---|
Next Message | Georg Kahest | 2016-04-28 10:11:31 | Re: BUG #14112: sorting v and w is broken with et_EE locate |
Previous Message | yuqiang.liao | 2016-04-28 08:41:22 | BUG #14118: ERROR: could not read block 0 in file causes the application goes down |