pgsql: More jsonb cleanup.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: More jsonb cleanup.
Дата
Msg-id E1WikMk-0006iG-AV@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve key representation for GIN jsonb_ops, and fix existence-
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix typcategory labeling of jsonb.