Content-Length: 292141 | pFad | http://github.com/postgrespro/postgres/commit/b945d169bb05e5f4052f031fd7c16db2232e26ce

D4 Fix initialization of JsonbzArrayIterator · postgrespro/postgres@b945d16 · GitHub
Skip to content

Commit b945d16

Browse files
author
Nikita Glukhov
committed
Fix initialization of JsonbzArrayIterator
1 parent f1e5e20 commit b945d16

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/backend/utils/adt/jsonb_util.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2894,10 +2894,23 @@ JsonbzArrayIteratorInit(JsonbzArrayIterator *it, CompressedJsonb *cjb)
28942894
#endif
28952895
const JsonbContainer *jbc = (const JsonbContainer *)((char *) jb + cjb->offset);
28962896

2897+
#ifndef JSONB_DETOAST_ITERATOR
2898+
CompressedDatumDecompress(cjb->datum, cjb->offset + ((char *) &jbc->children - (char *) jbc));
2899+
#else
2900+
PG_DETOAST_ITERATE(cjb->iter, (const char *) &jbc->children);
2901+
#endif
2902+
2903+
it->count = (jbc->header & JB_CMASK);
2904+
2905+
#ifndef JSONB_DETOAST_ITERATOR
2906+
CompressedDatumDecompress(cjb->datum, cjb->offset + ((char *) &jbc->children[it->count] - (char *) jbc));
2907+
#else
2908+
PG_DETOAST_ITERATE(cjb->iter, (const char *) &jbc->children[it->count]);
2909+
#endif
2910+
28972911
it->cjb = cjb;
28982912
it->container = jbc;
28992913
it->index = 0;
2900-
it->count = (jbc->header & JB_CMASK);
29012914
it->offset = 0;
29022915
it->base_addr = (char *) &jbc->children[it->count];
29032916
}

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/b945d169bb05e5f4052f031fd7c16db2232e26ce

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy