mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Revert 95d737ff
to add 'ignore_nulls'
Per discussion, revert the commit which added 'ignore_nulls' to row_to_json. This capability would be better added as an independent function rather than being bolted on to row_to_json. Additionally, the implementation didn't address complex JSON objects, and so was incomplete anyway. Pointed out by Tom and discussed with Andrew and Robert.
This commit is contained in:
@ -10309,13 +10309,11 @@ table2-mapping
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<literal>row_to_json(rowval record [, pretty bool [, ignore_nulls bool] ])</literal>
|
||||
<literal>row_to_json(record [, pretty_bool])</literal>
|
||||
</entry>
|
||||
<entry>
|
||||
Returns the row as a JSON object. Line feeds will be added between
|
||||
level-1 elements if <parameter>pretty_bool</parameter> is true. Elements
|
||||
with NULL values will be skipped when <parameter>ignore_nulls</parameter>
|
||||
is true.
|
||||
level-1 elements if <parameter>pretty_bool</parameter> is true.
|
||||
</entry>
|
||||
<entry><literal>row_to_json(row(1,'foo'))</literal></entry>
|
||||
<entry><literal>{"f1":1,"f2":"foo"}</literal></entry>
|
||||
|
Reference in New Issue
Block a user