=?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