# select  '"\uaBcD"'::json;
   json
----------
 "\uaBcD"

but

# select  '"\uaBcD"'::jsonb;
ERROR:  invalid input syntax for type json
LINE 1: select  '"\uaBcD"'::jsonb;
                ^
DETAIL: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
CONTEXT:  JSON data, line 1: ...

and

# select  '"\uaBcD"'::json -> 0;
ERROR:  invalid input syntax for type json
DETAIL: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
CONTEXT:  JSON data, line 1: ...
Time: 0,696 ms

More than, json looks strange:

# select  '["\uaBcD"]'::json;
    json
------------
 ["\uaBcD"]

but

# select  '["\uaBcD"]'::json->0;
ERROR:  invalid input syntax for type json
DETAIL: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
CONTEXT:  JSON data, line 1: [...

Looks like random parse rules.

--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to