Re: JSON Path and GIN Questions - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: JSON Path and GIN Questions
Date
Msg-id D791AD43-8DE9-4358-A77C-5BC5D82AFA73@justatheory.com
Whole thread Raw
In response to Re: JSON Path and GIN Questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: JSON Path and GIN Questions
List pgsql-hackers
On Sep 14, 2023, at 00:41, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> As far as json in particular is concerned, 8.14.4 jsonb Indexing [4]
> is pretty clear about what is or is not supported.

How do you feel about this note, then?

diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index b6c2ddbf55..7dda727f0d 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -413,6 +413,13 @@ SELECT doc->'site_name' FROM websites
     Two GIN <quote>operator classes</quote> are provided, offering different
     performance and flexibility trade-offs.
   </para>
+  <note>
+    <para>
+    As with all indexes, only operators on indexed columns are considered as
+    index qualifications. In other words, only <type>jsonb</type> operators can
+    take advantage of GIN indexes; <type>jsonb</type> functions cannot.
+    </para>
+  </note>
   <para>
     The default GIN operator class for <type>jsonb</type> supports queries with
     the key-exists operators <literal>?</literal>, <literal>?|</literal>


Best,

David


Attachment

pgsql-hackers by date:

Previous
From: stepan rutz
Date:
Subject: Re: Detoasting optionally to make Explain-Analyze less misleading
Next
From: "David E. Wheeler"
Date:
Subject: Re: JSON Path and GIN Questions