@@ -17725,28 +17725,28 @@ ERROR: jsonpath member accessor can only be applied to an object
17725
17725
The unwrapping behavior of lax mode can lead to surprising results. For
17726
17726
instance, the following query using the <literal>.**</literal> accessor
17727
17727
selects every <literal>HR</literal> value twice:
17728
- <screen>
17729
- <prompt>=></prompt> <userinput>select jsonb_path_query(:'json', 'lax $.**.HR');</userinput>
17730
- jsonb_path_query
17731
- ------------------
17732
- 73
17733
- 135
17734
- 73
17735
- 135
17736
- </screen>
17728
+ <screen>
17729
+ <prompt>=></prompt> <userinput>select jsonb_path_query(:'json', 'lax $.**.HR');</userinput>
17730
+ jsonb_path_query
17731
+ ------------------
17732
+ 73
17733
+ 135
17734
+ 73
17735
+ 135
17736
+ </screen>
17737
17737
This happens because the <literal>.**</literal> accessor selects both
17738
17738
the <literal>segments</literal> array and each of its elements, while
17739
17739
the <literal>.HR</literal> accessor automatically unwraps arrays when
17740
17740
using lax mode. To avoid surprising results, we recommend using
17741
17741
the <literal>.**</literal> accessor only in strict mode. The
17742
17742
following query selects each <literal>HR</literal> value just once:
17743
- <screen>
17744
- <prompt>=></prompt> <userinput>select jsonb_path_query(:'json', 'strict $.**.HR');</userinput>
17745
- jsonb_path_query
17746
- ------------------
17747
- 73
17748
- 135
17749
- </screen>
17743
+ <screen>
17744
+ <prompt>=></prompt> <userinput>select jsonb_path_query(:'json', 'strict $.**.HR');</userinput>
17745
+ jsonb_path_query
17746
+ ------------------
17747
+ 73
17748
+ 135
17749
+ </screen>
17750
17750
</para>
17751
17751
17752
17752
<para>