postgres=# select '["\u0000"]'::json->0;
?column?
----------
"\u0000"
(1 row)
Time: 1,294 ms
postgres=# select '["\u0000"]'::jsonb->0;
?column?
-----------
"\\u0000"
(1 row)
It seems to me that escape_json() is wrongly used in jsonb_put_escaped_value(),
right name of escape_json() is a escape_to_json().
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/