From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: More jsonb cleanup. |
Date: | 2014-05-09 12:57:30 |
Message-ID: | E1WikMk-0006iG-AV@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
More jsonb cleanup.
Fix JSONB_MAX_ELEMS and JSONB_MAX_PAIRS macros to use CB_MASK in the
calculation. JENTRY_POSMASK happens to have the same value at the moment,
but that's just coincidental.
Refactor jsonb iterator functions, for readability.
Get rid of the JENTRY_ISFIRST flag. Whenever we handle JEntrys, we have
access to the whole array and have enough context information to know
which entry is the first. This frees up one bit in the JEntry header for
future use. While we're at it, shuffle the JEntry bits so that boolean
true and false go together, for aesthetic reasons.
Bump catalog version as this changes the on-disk format slightly.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d9daff0e0cb15221789e6c50d9733c8754c054fb
Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 303 ++++++++++++++----------------------
src/include/catalog/catversion.h | 2 +-
src/include/utils/jsonb.h | 50 +++---
3 files changed, 139 insertions(+), 216 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-05-09 13:26:28 | pgsql: Fix typcategory labeling of jsonb. |
Previous Message | Tom Lane | 2014-05-09 12:41:34 | pgsql: Improve key representation for GIN jsonb_ops, and fix existence- |