From: Andrew Dunstan Date: Thu, 26 Sep 2013 21:39:28 +0000 (-0400) Subject: Fix erroneous statements about multiply specified JSON columns. X-Git-Tag: REL9_4_BETA1~1128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d70f8d5f1b8bfa62a34b79445faae39acdb0363d;p=postgresql Fix erroneous statements about multiply specified JSON columns. The behaviour in json_populate_record() and json_populate_recordset() was changed during development but the docs were not. --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ee1c957c73..7dd1ef2ea1 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10141,7 +10141,7 @@ table2-mapping Expands the object in from_json to a row whose columns match the record type defined by base. Conversion will be best 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. If a column is specified more than once, the last value is used. select * from json_populate_record(null::x, '{"a":1,"b":2}') @@ -10164,8 +10164,8 @@ table2-mapping Expands the outermost set of objects in from_json to a set whose columns match the record type defined by base. Conversion will be best effort; columns in base with no - corresponding key in from_json will be left null. A column - may only be specified once. + corresponding key in from_json will be left null. + If a column is specified more than once, the last value is used. select * from json_populate_recordset(null::x, '[{"a":1,"b":2},{"a":3,"b":4}]')