BUG #10728: json_to_recordset with nested json objects NULLs columns

Поиск
Список
Период
Сортировка
От matti.hameister@technologygroup.de
Тема BUG #10728: json_to_recordset with nested json objects NULLs columns
Дата
Msg-id 20140622153409.2618.90346@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #10728: json_to_recordset with nested json objects NULLs columns  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      10728
Logged by:          Matti Hameister
Email address:      matti.hameister@technologygroup.de
PostgreSQL version: 9.4beta1
Operating system:   Linux
Description:

This query:

--
SELECT X.* FROM
json_to_record(
'
{"a":2,"c":3,"b":{"z":4}, "d":6}
',true
) AS X(a int, b json, c int, d int);
--

returns as expected
a: 2
b: {"z":4}
c: 3
d: 6


Now I changed the query a bit (using recordset):

--
SELECT X.* FROM
json_to_recordset(
'[
{"a":2,"c":3,"b":{"z":4}, "d":6}
]
',true
) AS X(a int, b json, c int, d int);
--

the result is surprising:
a: NULL
b: {"z":4}
c: NULL
d: 6

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "MauMau"
Дата:
Сообщение: Re: Missing file versions for a bunch of dll/exe files in Windows builds
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #10728: json_to_recordset with nested json objects NULLs columns