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