File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -17725,28 +17725,28 @@ ERROR: jsonpath member accessor can only be applied to an object
1772517725 The unwrapping behavior of lax mode can lead to surprising results. For
1772617726 instance, the following query using the <literal>.**</literal> accessor
1772717727 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>
1773717737 This happens because the <literal>.**</literal> accessor selects both
1773817738 the <literal>segments</literal> array and each of its elements, while
1773917739 the <literal>.HR</literal> accessor automatically unwraps arrays when
1774017740 using lax mode. To avoid surprising results, we recommend using
1774117741 the <literal>.**</literal> accessor only in strict mode. The
1774217742 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>
1775017750 </para>
1775117751
1775217752 <para>
Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ BEGIN;
116116 now only choose one of these two commands, since all other commands
117117 will be ignored:
118118<programlisting>
119- ROLLBACK;
120- ROLLBACK TO SAVEPOINT sp1;
119+ ROLLBACK;
120+ ROLLBACK TO SAVEPOINT sp1;
121121</programlisting>
122122 Choosing <command>ROLLBACK</command> will abort everything, including
123123 value 1, whereas <command>ROLLBACK TO SAVEPOINT sp1</command> will retain
You can’t perform that action at this time.
0 commit comments