Re: Wanted: jsonb on-disk representation documentation - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Wanted: jsonb on-disk representation documentation
Date
Msg-id 536A16F3.9010608@vmware.com
Whole thread Raw
In response to Re: Wanted: jsonb on-disk representation documentation  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Wanted: jsonb on-disk representation documentation
Re: Wanted: jsonb on-disk representation documentation
Re: Wanted: jsonb on-disk representation documentation
List pgsql-hackers
So, apart from cleaning up the code, we really need to take a close look 
at the on-disk format now. The code can be cleaned up later, too, but 
we're going to be stuck with the on-disk format forever, so it's 
critical to get that right.

First, a few observations:

* JENTRY_ISFIRST is redundant. Whenever you deal with the Jentry struct, 
you know from the context which element in the array it is.

* JENTRY_ISNEST is set but never used.

* JENTRY_ISBOOL is defined as (JENTRY_ISNUMERIC | JENTRY_ISNEST), which 
seems confusing.

I'm going to proceed refactoring those things, which will change the 
on-disk format. It's late in the release cycle - these things really 
should've been cleaned up earlier - but it's important to get the 
on-disk format right. Shout if you have any objections.

- Heikki



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Wanted: jsonb on-disk representation documentation
Next
From: Michael Paquier
Date:
Subject: Re: Wanted: jsonb on-disk representation documentation