Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR
Date
Msg-id cc290a0c-e24c-45a8-a704-6120c2433f4c@manitou-mail.org
Whole thread Raw
In response to Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from aREFCURSOR  (Dent John <denty@QQdd.eu>)
Responses Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from aREFCURSOR
List pgsql-hackers
    Dent John wrote:

> Yes. That’s at least true if unnest(x) is used in the FROM. If it’s used in
> the SELECT, actually it can get the performance benefit right away

At a quick glance, I don't see it called in the select-list  in any
of the regression tests. When trying it, it appears to crash (segfault):

postgres=# begin;
BEGIN

postgres=# declare c cursor for select oid::int as i, relname::text as r from
pg_class;
DECLARE CURSOR

postgres=# select unnest('c'::refcursor);
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

The build is configured with:
./configure --enable-debug --with-icu --with-perl --enable-depend


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Avoid full GIN index scan when possible
Next
From: Alexander Korotkov
Date:
Subject: Re: Avoid full GIN index scan when possible