From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | xtracoder(at)gmail(dot)com |
Cc: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: BUG #13936: jsonb_object() -> ERROR: unknown type of jsonb container |
Date: | 2016-02-09 01:45:55 |
Message-ID: | CAM3SWZRkQkmqryAxyCrVw_DTbw=hKV5U3qEiWjkCXBhSiSPSCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Feb 8, 2016 at 11:52 AM, <xtracoder(at)gmail(dot)com> wrote:
> 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.: '{}'
I agree that this is a bug.
Looks like it's coming from the jsonb output function, which is an
additional concern:
#0 errfinish (dummy=dummy(at)entry=0) at elog.c:412
#1 0x00000000007fc11d in elog_finish (elevel=elevel(at)entry=20,
fmt=fmt(at)entry=0x9c5c30 "unkno"...) at elog.c:1372
#2 0x000000000076b006 in iteratorFromContainer
(container=container(at)entry=0x1be0d2c, parent=parent(at)entry=0x0) at
jsonb_util.c:930
#3 0x000000000076c3b4 in JsonbIteratorInit
(container=container(at)entry=0x1be0d2c) at jsonb_util.c:719
#4 0x0000000000766ea1 in JsonbToCStringWorker (out=0x1c74780,
out(at)entry=0x0, in=0x1be0d2c, estimated_len=6, indent=indent(at)entry=0
'\000') at jsonb.c:471
#5 0x000000000076855c in JsonbToCString (out=out(at)entry=0x0,
in=<optimized out>, estimated_len=<optimized out>) at jsonb.c:430
#6 0x000000000076857e in jsonb_out (fcinfo=<optimized out>) at jsonb.c:136
#7 0x00000000007fec03 in FunctionCall1Coll
(flinfo=flinfo(at)entry=0x1c6d0f0, collation=collation(at)entry=0,
arg1=arg1(at)entry=29232424) at fmgr.c:1297
#8 0x000000000080015f in OutputFunctionCall (flinfo=0x1c6d0f0,
val=29232424) at fmgr.c:1950
#9 0x000000000047294d in (slot=0x1c6c650, self=0x1be13c0) at printtup.c:359
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-02-09 01:52:49 | Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble |
Previous Message | Peter Geoghegan | 2016-02-09 01:32:52 | Re: BUG #13917: "upsert" construct doesn't work with partial index |