@@ -11855,14 +11855,28 @@ table2-mapping
11855
11855
11856
11856
<note>
11857
11857
<para>
11858
- In <function>json_populate_record</>, <function>json_populate_recordset</>,
11859
- <function>json_to_record</> and <function>json_to_recordset</>,
11860
- type coercion from the JSON is <quote>best effort</> and may not result
11861
- in desired values for some types. JSON keys are matched to
11862
- identical column names in the target row type. JSON fields that do not
11863
- appear in the target row type will be omitted from the output, and
11864
- target columns that do not match any JSON field will simply be NULL.
11858
+ While the examples for the functions
11859
+ <function>json_populate_record</function>,
11860
+ <function>json_populate_recordset</function>,
11861
+ <function>json_to_record</function> and
11862
+ <function>json_to_recordset</function> use constants, the typical use
11863
+ would be to reference a table in the <literal>FROM</literal> clause
11864
+ and use one of its <type>json</type> or <type>jsonb</type> columns
11865
+ as an argument to the function. Extracted key values can then be
11866
+ referenced in other parts of the query, like <literal>WHERE</literal>
11867
+ clauses and target lists. Extracting multiple values in this
11868
+ way can improve performance over extracting them separately with
11869
+ per-key operators.
11865
11870
</para>
11871
+
11872
+ <para>
11873
+ JSON keys are matched to identical column names in the target
11874
+ row type. JSON type coercion for these functions is <quote>best
11875
+ effort</quote> and may not result in desired values for some types.
11876
+ JSON fields that do not appear in the target row type will be
11877
+ omitted from the output, and target columns that do not match any
11878
+ JSON field will simply be NULL.
11879
+ </para>
11866
11880
</note>
11867
11881
11868
11882
<note>
0 commit comments