Content-Length: 286100 | pFad | http://github.com/postgrespro/postgres/commit/eec6be01c2d6b200a4c4b4eb7c85e5fd1568040f

BA Use JsonValueWrapInBinary() · postgrespro/postgres@eec6be0 · GitHub
Skip to content

Commit eec6be0

Browse files
author
Nikita Glukhov
committed
Use JsonValueWrapInBinary()
1 parent 72d9e82 commit eec6be0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/backend/utils/adt/json_generic.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,7 @@ jsonvArrayIteratorNext(JsonIterator **it, JsonValue *res, bool skipNested)
399399
else if (res->type != jbvBinary)
400400
{
401401
Assert(res->type == jbvArray || res->type == jbvObject);
402-
res->val.binary.data = JsonValueToContainer(val);
403-
res->val.binary.uniquified = JsonValueIsUniquified(val);
404-
res->type = jbvBinary;
402+
JsonValueWrapInBinary(val, res);
405403
}
406404
}
407405

@@ -451,10 +449,7 @@ jsonvObjectIteratorNext(JsonIterator **it, JsonValue *res, bool skipNested)
451449
else if (res->type != jbvBinary)
452450
{
453451
Assert(res->type == jbvArray || res->type == jbvObject);
454-
res->val.binary.data = JsonValueToContainer(&pair->value);
455-
res->val.binary.uniquified =
456-
JsonValueIsUniquified(&pair->value);
457-
res->type = jbvBinary;
452+
JsonValueWrapInBinary(&pair->value, res);
458453
}
459454
}
460455

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/eec6be01c2d6b200a4c4b4eb7c85e5fd1568040f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy