mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Doc: improve documentation for jsonpath behavior.
Clarify the behavior of jsonpath operators and functions by describing their two different modes of operation explicitly. In addition to the SQL-spec behavior, where a path returns a list of matching items, we have a "predicate check" form that always returns a single boolean result. That was mentioned in only one place, but it seems better to annotate each operator and function as to which form(s) it takes. Also improve the examples by converting them into actual executable SQL with results, and do a bunch of incidental wordsmithing. David Wheeler, reviewed by Erik Wienhold, Jian He, and myself Discussion: https://postgr.es/m/7262A188-59CA-4A8A-AAD7-83D4FF0B9758@justatheory.com
This commit is contained in:
@@ -513,7 +513,7 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
|
||||
</programlisting>
|
||||
For these operators, a GIN index extracts clauses of the form
|
||||
<literal><replaceable>accessors_chain</replaceable>
|
||||
= <replaceable>constant</replaceable></literal> out of
|
||||
== <replaceable>constant</replaceable></literal> out of
|
||||
the <type>jsonpath</type> pattern, and does the index search based on
|
||||
the keys and values mentioned in these clauses. The accessors chain
|
||||
may include <literal>.<replaceable>key</replaceable></literal>,
|
||||
|
Reference in New Issue
Block a user