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

From Dent John
Subject Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from aREFCURSOR
Date
Msg-id 16F0596F-502E-4CD9-BCFC-7FA1BF63355E@QQdd.eu
Whole thread Raw
In response to Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR  (Roman Pekar <roma.pekar@gmail.com>)
Responses Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
Hi folks,

I’ve made a revision of this patch. 

The significant change is to access the Portal using Portal APIs rather than through SPI. It seems the persisted state necessary to survive being used to retrieve a row at a time inside an SRF just isn’t a good fit for SPI. 

It turned out there was upstream machinery in the FunctionScan node that prevented Postgres being able to pipeline SRFs, even if they return ValuePerCall. So, in practice, this patch is of limited benefit without another patch that changes that behaviour (see [1]). Nevertheless, the code is independent so I’m submitting the two changes separately. 

I’ll push this into the Jan commit fest.

denty. 


Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: logical decoding : exceeded maxAllocatedDescs for .spill files
Next
From: Fabien COELHO
Date:
Subject: Re: psql's \watch is broken