Jsonb: jbvBinary usage in the convertJsonbValue? - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Jsonb: jbvBinary usage in the convertJsonbValue?
Date
Msg-id CA+q6zcXOHj1BD3rLpLDj9cSF8949kZycF1Xv_wiJRJhnhe6FDw@mail.gmail.com
Whole thread Raw
Responses Re: Jsonb: jbvBinary usage in the convertJsonbValue?
List pgsql-hackers
Hi all,

I'm little confused by the convertJsonbValue functon at jsonb_utils.c
Maybe I misunderstood something, so I need help =)

>>> if (IsAJsonbScalar(val) || val->type == jbvBinary)
>>>     convertJsonbScalar(buffer, header, val);

As I can see, the convertJsonbScalar function is used for scalar and binary jsonb values. But this function doesn't handle the jbvBinary type.

>>> switch (scalarVal->type)
>>>     case jbvNull:
>>>     ...
>>>     case jbvString:
>>>     ...
>>>     case jbvNumeric:
>>>     .....
>>>     case jbvBool:
>>>     .....
>>>     default:
>>>         elog(ERROR, "invalid jsonb scalar type");

Does this mean, that binary type is incorrect for convertJsonbValue ? Or am I missed something?

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Compression of full-page-writes
Next
From: Gurjeet Singh
Date:
Subject: Re: Proposing pg_hibernate