Обсуждение: [NOVICE] jsonb and null

Поиск
Список
Период
Сортировка

[NOVICE] jsonb and null

От
Alexey Luchko
Дата:
Hi!

I've found that jsonb nulls are not SQL NULLs.
I just wonder for what on earth this

    SELECT to_jsonb(ARRAY[NULL]::int[])#>'{0}' IS NULL;

is false? :)

Regards
Alex


Re: [NOVICE] jsonb and null

От
Alexey Luchko
Дата:
> this
>
>     SELECT to_jsonb(ARRAY[NULL]::int[])#>'{0}' IS NULL;
>
> is false?

These are surprising as well

> SELECT 'null'::jsonb IS NULL;
 ?column?
----------
 f
(1 row)

> SELECT ('{}'::jsonb)#>'{"a"}' IS NULL;
 ?column?
----------
 t
(1 row)

--
Regards
Alex