BUG #13936: jsonb_object() -> ERROR: unknown type of jsonb container

From: xtracoder(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13936: jsonb_object() -> ERROR: unknown type of jsonb container
Date: 2016-02-08 19:52:07
Message-ID: 20160208195207.2647.46863@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: 13936
Logged by: Xtra Coder
Email address: xtracoder(at)gmail(dot)com
PostgreSQL version: 9.5.0
Operating system: Windows7
Description:

I'm getting absolutely misleading error message when trying to build a JSON
object from empty resultset.

Here is the simple code to reproduce:

select jsonb_object('{}'::text[], '{}'::text[])

Result of execution is

ERROR: unknown type of jsonb container
********** Error **********

ERROR: unknown type of jsonb container
SQL state: XX000

Expected result - jsonb object with no attributes, i.e.: '{}'

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message xtracoder 2016-02-08 20:29:59 BUG #13937: 'src' -> jsonb_each() -> jsonb_object() -> 'dst' does not recreate 'src' as valid jsonb
Previous Message bear2k 2016-02-08 16:32:22 BUG #13935: Duplicate row in pg_constraint table which is not accessible via indexes