1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Cleanup around json_to_record/json_to_recordset

Set function parameter names and defaults. Add jsonb versions (which the
code already provided for so the actual new code is trivial). Add jsonb
regression tests and docs.

Bump catalog version (which I apparently forgot to do when jsonb was
committed).
This commit is contained in:
Andrew Dunstan
2014-03-26 10:18:24 -04:00
parent 28475f8e58
commit f9c6d72cbf
9 changed files with 99 additions and 19 deletions

View File

@ -10443,9 +10443,15 @@ table2-mapping
<indexterm>
<primary>json_to_record</primary>
</indexterm>
<indexterm>
<primary>jsonb_to_record</primary>
</indexterm>
<indexterm>
<primary>json_to_recordset</primary>
</indexterm>
<indexterm>
<primary>jsonb_to_recordset</primary>
</indexterm>
<table id="functions-json-processing-table">
<title>JSON Processing Functions</title>
@ -10649,9 +10655,9 @@ table2-mapping
<entry><literal>number</literal></entry>
</row>
<row>
<entry>
<literal>json_to_record(json, nested_as_text bool)</literal>
</entry>
<entry><para><literal>json_to_record(json [, nested_as_text bool=false])</literal>
</para><para><literal>jsonb_to_record(jsonb [, nested_as_text bool=false])</literal>
</para></entry>
<entry><type>record</type></entry>
<entry>
Returns an arbitrary record from a JSON object. As with all functions
@ -10670,9 +10676,9 @@ table2-mapping
</entry>
</row>
<row>
<entry>
<literal>json_to_recordset(json, nested_as_text bool)</literal>
</entry>
<entry><para><literal>json_to_recordset(json [, nested_as_text bool=false])</literal>
</para><para><literal>jsonb_to_recordset(jsonb [, nested_as_text bool=false])</literal>
</para></entry>
<entry><type>setof record</type></entry>
<entry>
Returns an arbitrary set of records from a JSON object. As with