Skip to content

Commit a0a6d42

Browse files
author
Nikita Glukhov
committed
Optimize encoding of JsonValue containers
1 parent 38259fd commit a0a6d42

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/adt/jsonb_util.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,9 @@ convertJsonbBinary(StringInfo buffer, JEntry *pheader, const JsonbValue *val,
23542354
appendToBuffer(buffer, (void *) jbc, jc->len);
23552355
*pheader = JENTRY_ISCONTAINER | (buffer->len - base_offset);
23562356
}
2357+
else if (jc->ops == &jsonvContainerOps && !JsonContainerIsScalar(jc))
2358+
convertJsonbValue(buffer, pheader,
2359+
(const JsonValue *) JsonContainerDataPtr(jc), level);
23572360
else
23582361
convertJsonbValue(buffer, pheader, JsonValueUnpackBinary(val), level);
23592362
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy