pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: thibaut.madelaine@dalibo.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15669: Error with unnest in PG 11 (ERROR: 0A000)
Date: Tue, 05 Mar 2019 10:39:07 -0500
Message-ID: <19353.1551800347@sss.pgh.pa.us> (raw)
In-Reply-To: <15669-02fb3296cca26203@postgresql.org>
References: <15669-02fb3296cca26203@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> In PostgreSQL 10.7 and before, it is possible to run the following query:

> thibaut=# WITH test AS ( SELECT array[1,2] AS intarr ) 
>                  SELECT unnest(intarr) AS lot_id FROM test WHERE false;

> In version 11.2, the same query fails:
> ERROR:  0A000: set-valued function called in context that cannot accept a set

Hmm, that's definitely a bug.  It looks like we're forgetting to make
a ProjectSet plan node for the unnest() if we realize that the query
is a no-op; but I'm not sure why 10.x doesn't have the same issue.
Digging ...

			regards, tom lane




view thread (18+ messages)  latest in thread

Message-ID: <19353.1551800347@sss.pgh.pa.us>
Permalink:  ../19353.1551800347@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19353.1551800347@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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thibaut.madelaine@dalibo.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15669: Error with unnest in PG 11 (ERROR: 0A000)
  In-Reply-To: <19353.1551800347@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