Re: JSON Path and GIN Questions

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: JSON Path and GIN Questions
Date: 2023-09-16 21:29:18
Message-ID: 09A0AC30-11EE-4D7D-8E2C-E069FBD84939@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 16, 2023, at 16:50, Erik Wienhold <ewie(at)ewie(dot)name> wrote:

> "For these operators, a GIN index extracts clauses of the form
> **accessors_chain = constant** out of the jsonpath pattern, and does the
> index search based on the keys and values mentioned in these clauses."
>
> I don't know if this is a general limitation of GIN indexes or just how these
> operators are implemented right now.
>
> [1] https://www.postgresql.org/docs/current/datatype-json.html#JSON-INDEXING

The detail that jumps out at me is this one on jsonb_path_ops:

“Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it”

Because jsonb_path_ops indexes hashes, I would assume it would only support path equality. But it’s not clear to me from these docs that jsonb_ops also indexes hashes. Does it?

Best,

D

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Wienhold 2023-09-16 22:13:56 Re: JSON Path and GIN Questions
Previous Message Erik Wienhold 2023-09-16 20:50:13 Re: JSON Path and GIN Questions