| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Subject: | Re: [COMMITTERS] pgsql: Mark JSON error detail messages for translation. |
| Date: | 2012-06-13 23:49:07 |
| Message-ID: | 23330.1339631347@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> ! DETAIL: Character with value 0x0a must be escaped.
>>> ! CONTEXT: JSON data, line 1: "abc
>>> ! ...
>>>
>>> This seems an odd way to present this, especially if the goal is to
>>> NOT include the character needing escaping in the log unescaped, which
>>> I thought was the point of saying 0x0a.
I thought of a simple way to address that objection for this particular
case: we can just truncate the context display *at* the offending
character, instead of *after* it. This is playing a bit fast and loose
with the general principle that the context should end at the point of
detection of the error; but given that the character in question is
always unprintable, I think it's probably not going to bother anyone.
I've gone ahead and committed this before branching, though I'm
certainly still willing to entertain suggestions for further
improvement.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | pgsql | 2012-06-13 23:57:37 | pgsql: Branch refs/heads/REL9_2_STABLE was created |
| Previous Message | Tom Lane | 2012-06-13 23:43:58 | pgsql: Revisit error message details for JSON input parsing. |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig Ringer | 2012-06-13 23:55:50 | Re: Minimising windows installer password confusion |
| Previous Message | Craig Ringer | 2012-06-13 23:46:08 | Re: Minimising windows installer password confusion |