mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
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.
This commit is contained in:
parent
fd1afbbedc
commit
a6896e0005
@ -1314,7 +1314,14 @@ convertJsonbValue(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
|
|||||||
if (!val)
|
if (!val)
|
||||||
return;
|
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);
|
convertJsonbScalar(buffer, header, val);
|
||||||
else if (val->type == jbvArray)
|
else if (val->type == jbvArray)
|
||||||
convertJsonbArray(buffer, header, val, level);
|
convertJsonbArray(buffer, header, val, level);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user