Jsonb: jbvBinary usage in the convertJsonbValue?

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Jsonb: jbvBinary usage in the convertJsonbValue?
Date: 2014-05-29 11:34:12
Message-ID: CA+q6zcXOHj1BD3rLpLDj9cSF8949kZycF1Xv_wiJRJhnhe6FDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2014-05-29 11:52:56 Re: Proposing pg_hibernate
Previous Message Simon Riggs 2014-05-29 10:21:44 Re: Compression of full-page-writes