pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Kornilov <sk@zsrv.org>
To: yunlong.gao <yunlong.gao@qunar.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: May be a jsonb type bug
Date: Fri, 22 Dec 2017 16:04:34 +0300
Message-ID: <129801513947874@web13g.yandex.ru> (raw)
In-Reply-To: <ae4325cd-4e99-b9d0-34f7-55ebe8f1a028@qunar.com>
References: <ae4325cd-4e99-b9d0-34f7-55ebe8f1a028@qunar.com>

Hi
'null' - is valid JSON document, but not array or object. It is just JSON-null in JSON. (not NULL in terms RDBMS)
Same as '"test"' - is valid JSON-encoded string 'test', '10' - valid JSON int scalar.

jsonb_array_length accept only JSON array documents: '[1,2,3]', '[null, null]', '[]', '[{"n":1}]' and so on and not accept scalars and objects

Regards, Sergej




view thread (3+ messages)  latest in thread

Message-ID: <129801513947874@web13g.yandex.ru>
Permalink:  ../129801513947874@web13g.yandex.ru/
Also on:    postgresql.org/message-id/129801513947874@web13g.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sk@zsrv.org, yunlong.gao@qunar.com
  Subject: Re: May be a jsonb type bug
  In-Reply-To: <129801513947874@web13g.yandex.ru>
  References: <ae4325cd-4e99-b9d0-34f7-55ebe8f1a028@qunar.com> <129801513947874@web13g.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox