Commit 96066198 authored by Andrew Dunstan's avatar Andrew Dunstan

Remove unnecessary check for jbvBinary in convertJsonbValue.

The check was confusing and is a condition that should never in fact
happen.

Per gripe from Dmitry Dolgov.
parent 66802246
......@@ -1314,7 +1314,14 @@ convertJsonbValue(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
if (!val)
return;
if (IsAJsonbScalar(val) || val->type == jbvBinary)
/*
* A JsonbValue passed as val should never have a type of jbvBinary,
* and neither should any of its sub-components. Those values will be
* produced by convertJsonbArray and convertJsonbObject, the results of
* which will not be passed back to this function as an argument.
*/
if (IsAJsonbScalar(val))
convertJsonbScalar(buffer, header, val);
else if (val->type == jbvArray)
convertJsonbArray(buffer, header, val, level);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment