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.: '{}'