On 09/16/2014 10:37 PM, Robert Haas wrote:
On Tue, Sep 16, 2014 at 3:24 PM, Josh Berkus <j...@agliodbs.com> wrote:
Do you feel that way *as a code maintainer*?  That is, if you ended up
maintaining the JSONB code, would you still feel that it's worth the
extra complexity?  Because that will be the main cost here.

I feel that Heikki doesn't have a reputation for writing or committing
unmaintainable code.

I haven't reviewed the patch.

The patch I posted was not pretty, but I'm sure it could be refined to something sensible.

There are many possible variations of the basic scheme of storing mostly lengths, but an offset for every N elements. I replaced the length with offset on some element and used a flag bit to indicate which it is. Perhaps a simpler approach would be to store lengths, but also store a separate smaller array of offsets, after the lengths array.

I can write a patch if we want to go that way.

- Heikki



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to