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

From Andrew Dunstan
Subject Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Date
Msg-id 536E9386.6050701@dunslane.net
Whole thread Raw
In response to Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
List pgsql-hackers
On 05/10/2014 04:42 PM, Heikki Linnakangas wrote:
>
>
> The main difference between the two opclasses from a user's standpoint 
> is not whether they hash or not. The big difference is that one 
> indexes complete paths from the root, and the other indexes just the 
> "leaf" level. For example, if you have an object like '{"foo": {"bar": 
> 123 } }', one will index "foo", "foo->bar", and "foo->bar->123" while 
> the other will index "foo", "bar" and "123".
>
> Whether the opclasses use hashing to shorten the key is an orthogonal 
> property, and IMHO not as important. To reflect that, I suggest that 
> we name the opclasses:
>
> json_path_ops
> json_value_ops
>
> or something along those lines.
>
>


That looks like the first suggestion I've actually liked and that users 
will be able to understand.

cheers

andrew




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Lossy bitmap scan is broken in GIN
Next
From: Fujii Masao
Date:
Subject: Re: New pg_lsn type doesn't have hash/btree opclasses