Re: BUG #15578: Executing json_populate_recordset with an empty array causes a segmentation fault

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15578: Executing json_populate_recordset with an empty array causes a segmentation fault
Дата
Msg-id 13027.1546837948@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #15578: Executing json_populate_recordset with an empty arraycauses a segmentation fault  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> When executing json_populate_recordset/jsonb_populate_recordset with an
> empty array, a segmentation fault occurs and the server process is
> terminated. The issue occurs regardless of the type used. In previous
> versions this would return null.
> Example:
> CREATE TYPE test_type AS (amount numeric, description text);
> SELECT * FROM json_populate_recordset(null::test_type,'[]');

Hm, this example works for me in HEAD and 11 branch tip, so I'm
guessing it was fixed by this commit:

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=595220a3a

That'll be out in 11.2, or you can apply the patch locally if
you're in a hurry.

            regards, tom lane


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15578: Executing json_populate_recordset with an emptyarray causes a segmentation fault
Следующее
От: Bartosz Polnik
Дата:
Сообщение: Re: BUG #15577: Query returns different results when executedmultiple times