@@ -11457,14 +11457,28 @@ table2-mapping
11457
11457
11458
11458
<note>
11459
11459
<para>
11460
- In <function>json_populate_record</>, <function>json_populate_recordset</>,
11461
- <function>json_to_record</> and <function>json_to_recordset</>,
11462
- type coercion from the JSON is <quote>best effort</> and may not result
11463
- in desired values for some types. JSON keys are matched to
11464
- identical column names in the target row type. JSON fields that do not
11465
- appear in the target row type will be omitted from the output, and
11466
- target columns that do not match any JSON field will simply be NULL.
11460
+ While the examples for the functions
11461
+ <function>json_populate_record</function>,
11462
+ <function>json_populate_recordset</function>,
11463
+ <function>json_to_record</function> and
11464
+ <function>json_to_recordset</function> use constants, the typical use
11465
+ would be to reference a table in the <literal>FROM</literal> clause
11466
+ and use one of its <type>json</type> or <type>jsonb</type> columns
11467
+ as an argument to the function. Extracted key values can then be
11468
+ referenced in other parts of the query, like <literal>WHERE</literal>
11469
+ clauses and target lists. Extracting multiple values in this
11470
+ way can improve performance over extracting them separately with
11471
+ per-key operators.
11467
11472
</para>
11473
+
11474
+ <para>
11475
+ JSON keys are matched to identical column names in the target
11476
+ row type. JSON type coercion for these functions is <quote>best
11477
+ effort</quote> and may not result in desired values for some types.
11478
+ JSON fields that do not appear in the target row type will be
11479
+ omitted from the output, and target columns that do not match any
11480
+ JSON field will simply be NULL.
11481
+ </para>
11468
11482
</note>
11469
11483
11470
11484
<note>
0 commit comments