BUG #12620: JSONB seems to incorrectly handle escaped unicode - Mailing list pgsql-bugs

From dgillis@dystillr.com
Subject BUG #12620: JSONB seems to incorrectly handle escaped unicode
Date
Msg-id 20150121222609.32670.59262@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #12620: JSONB seems to incorrectly handle escaped unicode
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12620
Logged by:          Duncan Gillis
Email address:      dgillis@dystillr.com
PostgreSQL version: 9.4.0
Operating system:   Mac OS X 10.10.1
Description:

When you give cast a string such as '"\\u0000"' as JSONB, it removes the
first slash. With plain JSON:

template1=# select '"\\u0000"'::json;
    json
------------
 "\\u0000"
(1 row)

Whereas with JSONB one of the slashes is gone:

template1=# select '"\\u0000"'::jsonb;
   jsonb
-----------
 "\u0000"
(1 row)

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_upgrade failure on Windows Server
Next
From: Asif Naeem
Date:
Subject: Re: pg_upgrade failure on Windows Server