BUG #12620: JSONB seems to incorrectly handle escaped unicode

From: dgillis(at)dystillr(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12620: JSONB seems to incorrectly handle escaped unicode
Date: 2015-01-21 22:26:09
Message-ID: 20150121222609.32670.59262@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12620
Logged by: Duncan Gillis
Email address: dgillis(at)dystillr(dot)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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ousema2003 2015-01-21 23:05:44 BUG #12622: mapping java object to postgres with types
Previous Message Bruce Momjian 2015-01-21 18:36:49 Re: pg_upgrade failure on Windows Server