@@ -10843,14 +10843,28 @@ table2-mapping
10843
10843
10844
10844
<note>
10845
10845
<para>
10846
- In <function>json_populate_record</>, <function>json_populate_recordset</>,
10847
- <function>json_to_record</> and <function>json_to_recordset</>,
10848
- type coercion from the JSON is <quote>best effort</> and may not result
10849
- in desired values for some types. JSON keys are matched to
10850
- identical column names in the target row type. JSON fields that do not
10851
- appear in the target row type will be omitted from the output, and
10852
- target columns that do not match any JSON field will simply be NULL.
10846
+ While the examples for the functions
10847
+ <function>json_populate_record</function>,
10848
+ <function>json_populate_recordset</function>,
10849
+ <function>json_to_record</function> and
10850
+ <function>json_to_recordset</function> use constants, the typical use
10851
+ would be to reference a table in the <literal>FROM</literal> clause
10852
+ and use one of its <type>json</type> or <type>jsonb</type> columns
10853
+ as an argument to the function. Extracted key values can then be
10854
+ referenced in other parts of the query, like <literal>WHERE</literal>
10855
+ clauses and target lists. Extracting multiple values in this
10856
+ way can improve performance over extracting them separately with
10857
+ per-key operators.
10853
10858
</para>
10859
+
10860
+ <para>
10861
+ JSON keys are matched to identical column names in the target
10862
+ row type. JSON type coercion for these functions is <quote>best
10863
+ effort</quote> and may not result in desired values for some types.
10864
+ JSON fields that do not appear in the target row type will be
10865
+ omitted from the output, and target columns that do not match any
10866
+ JSON field will simply be NULL.
10867
+ </para>
10854
10868
</note>
10855
10869
10856
10870
<note>
0 commit comments