From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: slightly confusing JSON error context |
Date: | 2013-06-20 02:35:53 |
Message-ID: | 51C26A89.9010303@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/19/2013 09:19 PM, Peter Eisentraut wrote:
> These are some cases from the regression tests:
>
> SELECT ''::json; -- ERROR, no value
> ERROR: invalid input syntax for type json
> LINE 1: SELECT ''::json;
> ^
> DETAIL: The input string ended unexpectedly.
> CONTEXT: JSON data, line 1:
>
> SELECT ' '::json; -- ERROR, no value
> ERROR: invalid input syntax for type json
> LINE 1: SELECT ' '::json;
> ^
> DETAIL: The input string ended unexpectedly.
> CONTEXT: JSON data, line 1:
>
> Perhaps we should either put some quotes around the whitespace at the
> end of the CONTEXT lines, or write something like "end of input".
> Otherwise this might look weird. There might be more complicated cases
> where it looks even weirder.
>
It's been that way since 9.2. I at least have no problem if you want to
make improvements.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Satoshi Nagayasu | 2013-06-20 02:43:43 | Re: Fix pgstattuple/pgstatindex to use regclass-type as the argument |
Previous Message | Alvaro Herrera | 2013-06-20 02:05:28 | Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks) |