On Mon, Dec 5, 2016 at 10:53 AM, <rainer.steinmueller@kit.edu> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14449
> Logged by: Rainer Steinm=C3=BCller
> Email address: rainer.steinmueller@kit.edu
> PostgreSQL version: 9.6.1
> Operating system: Debian 3.16.36-1+deb8u2 x86_64 GNU/Linux
> Description:
>
> # all the following sql statements are tested with psql.
> # try to cast or to convert a sql NULL value to json/jsonb null does not
> generate the desired result:
>
> net=3D> select to_jsonb(null::text);
> to_jsonb
> ----------
>
> (1 row)
>
=E2=80=8BPrevious discussion on -hackers on this topic.
https://www.postgresql.org/message-id/CAFj8pRBdi4Ud-%3D8kfM28i7fa%3DB6t%3Dn=
FTM3UK5qNBm9TjazC99A%40mail.gmail.com
=E2=80=8BThe general conclusion is that the benefit of making this consiste=
nt
outweighs the effort to define that consistency and introduce a breakage in
compatibility.=E2=80=8B
David J.