Commit d7d58320 authored by Andrew Dunstan's avatar Andrew Dunstan

Fix a few thinkos in the JSON functions docs.

Dickson S. Guedes
parent b8ed4cc9
...@@ -9967,7 +9967,7 @@ table2-mapping ...@@ -9967,7 +9967,7 @@ table2-mapping
a boolean or NULL, the text representation will be used, escaped and a boolean or NULL, the text representation will be used, escaped and
quoted so that it is legal JSON. quoted so that it is legal JSON.
</entry> </entry>
<entry><literal>to_json('Fred said "Hi."'</literal></entry> <entry><literal>to_json('Fred said "Hi."'::text)</literal></entry>
<entry><literal>"Fred said \"Hi.\""</literal></entry> <entry><literal>"Fred said \"Hi.\""</literal></entry>
</row> </row>
<row> <row>
...@@ -9995,7 +9995,7 @@ table2-mapping ...@@ -9995,7 +9995,7 @@ table2-mapping
<entry> <entry>
Expands the outermost json object into a set of key/value pairs. Expands the outermost json object into a set of key/value pairs.
</entry> </entry>
<entry><literal>select * from json_each_as_text('{"a":"foo", "b":"bar"}')</literal></entry> <entry><literal>select * from json_each('{"a":"foo", "b":"bar"}')</literal></entry>
<entry> <entry>
<programlisting> <programlisting>
key | value key | value
...@@ -10017,7 +10017,7 @@ table2-mapping ...@@ -10017,7 +10017,7 @@ table2-mapping
Expands the outermost json object into a set of key/value pairs. The Expands the outermost json object into a set of key/value pairs. The
returned value will be of type text. returned value will be of type text.
</entry> </entry>
<entry><literal>select * from json_each_as_text('{"a":"foo", "b":"bar"}')</literal></entry> <entry><literal>select * from json_each_text('{"a":"foo", "b":"bar"}')</literal></entry>
<entry> <entry>
<programlisting> <programlisting>
key | value key | value
...@@ -10090,7 +10090,7 @@ table2-mapping ...@@ -10090,7 +10090,7 @@ table2-mapping
effort; columns in base with no corresponding key in from_json effort; columns in base with no corresponding key in from_json
will be left null. A column may only be specified once. will be left null. A column may only be specified once.
</entry> </entry>
<entry><literal>json_populate_record(null::x, '{"a":1,"b":2}')</literal></entry> <entry><literal>select * from json_populate_record(null::x, '{"a":1,"b":2}')</literal></entry>
<entry> <entry>
<programlisting> <programlisting>
a | b a | b
...@@ -10114,7 +10114,7 @@ table2-mapping ...@@ -10114,7 +10114,7 @@ table2-mapping
corresponding key in from_json will be left null. A column corresponding key in from_json will be left null. A column
may only be specified once. may only be specified once.
</entry> </entry>
<entry><literal>json_populate_recordset(null::x, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal></entry> <entry><literal>select * from json_populate_recordset(null::x, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal></entry>
<entry> <entry>
<programlisting> <programlisting>
a | b a | b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment