Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Date
Msg-id 28961.1399668272@sss.pgh.pa.us
Whole thread Raw
In response to Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)  (Greg Stark <stark@mit.edu>)
Responses Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> Well the question seems to me to be that if we're always doing recheck
> then what advantage is there to not hashing everything?

Right now, there's not much.  But it seems likely to me that there will be
more JSON operators in future, and some of them might be able to make use
of the additional specificity of unhashed entries.  For example, it's only
a very arbitrary definitional choice for the exists operator (ie, not
looking into sub-objects) that makes jsonb_ops lossy for it.  We might
eventually build a recursive-exists-check operator for which the index
could be lossless, at least up to the string length where we start to
hash.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Sending out a request for more buildfarm animals?
Next
From: Andres Freund
Date:
Subject: Re: pg_class.relpages/allvisible probably shouldn't be a int4