btw ... in jsonb.h there is this comment:
* Jsonb Keys and string array elements are treated equivalently when
* serialized to text index storage. One day we may wish to create an opclass
* that only indexes values, but for now keys and values are stored in GIN
* indexes in a way that doesn't really consider their relationship to each
* other.
Is this an obsolete speculation about writing jsonb_hash_ops, or is there
still something worth preserving there? If so, what?
regards, tom lane