pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: gregk@stoddarts.com.au
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15578: Executing json_populate_recordset with an empty array causes a segmentation fault
Date: Mon, 07 Jan 2019 00:12:28 -0500
Message-ID: <13027.1546837948@sss.pgh.pa.us> (raw)
In-Reply-To: <15578-832c854e58dde50c@postgresql.org>
References: <15578-832c854e58dde50c@postgresql.org>

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




view thread (3+ messages)

Message-ID: <13027.1546837948@sss.pgh.pa.us>
Permalink:  ../13027.1546837948@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13027.1546837948@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gregk@stoddarts.com.au
  Subject: Re: BUG #15578: Executing json_populate_recordset with an empty array causes a segmentation fault
  In-Reply-To: <13027.1546837948@sss.pgh.pa.us>
  References: <15578-832c854e58dde50c@postgresql.org> <13027.1546837948@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox