Re: Patch: Improve Boolean Predicate JSON Path Docs

David E. Wheeler <david@justatheory.com>

From: "David E. Wheeler" <david@justatheory.com>
To: "David E. Wheeler" <david@justatheory.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Erik Wienhold <ewie@ewie.name>, pgsql-hackers@lists.postgresql.org
Date: 2024-01-21T20:02:37Z
Lists: pgsql-hackers
On Jan 21, 2024, at 14:58, David E. Wheeler <david@justatheory.com> wrote:

> I make this interpretation based on this bit of the docs:

Sorry, that’s from my branch. Here it is in master:

   <listitem>
<para>
A path expression can be a Boolean predicate, although the SQL/JSON
standard allows predicates only in filters. This is necessary for
implementation of the <literal>@@</literal> operator. For example,
the following <type>jsonpath</type> expression is valid in
<productname>PostgreSQL</productname>:
<programlisting>
$.track.segments[*].HR &lt; 70
</programlisting>
</para>
</listitem>

In any event, something to do with @@, perhaps to have some compatibility with `jsonb @> jsonb`? I don’t know why @@ was important to have.

David




Commits

  1. Doc: improve documentation for jsonpath behavior.

  2. Ensure we have a snapshot while dropping ON COMMIT DROP temp tables.